~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/arm/mach-vt8500/devices-vt8500.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* linux/arch/arm/mach-vt8500/devices-vt8500.c
 
2
 *
 
3
 * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
 
4
 *
 
5
 * This software is licensed under the terms of the GNU General Public
 
6
 * License version 2, as published by the Free Software Foundation, and
 
7
 * may be copied, distributed, and modified under those terms.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 */
 
15
 
 
16
#include <linux/platform_device.h>
 
17
 
 
18
#include <mach/vt8500_regs.h>
 
19
#include <mach/vt8500_irqs.h>
 
20
#include <mach/i8042.h>
 
21
#include "devices.h"
 
22
 
 
23
void __init vt8500_set_resources(void)
 
24
{
 
25
        struct resource tmp[3];
 
26
 
 
27
        tmp[0] = wmt_mmio_res(VT8500_LCDC_BASE, SZ_1K);
 
28
        tmp[1] = wmt_irq_res(IRQ_LCDC);
 
29
        wmt_res_add(&vt8500_device_lcdc, tmp, 2);
 
30
 
 
31
        tmp[0] = wmt_mmio_res(VT8500_UART0_BASE, 0x1040);
 
32
        tmp[1] = wmt_irq_res(IRQ_UART0);
 
33
        wmt_res_add(&vt8500_device_uart0, tmp, 2);
 
34
 
 
35
        tmp[0] = wmt_mmio_res(VT8500_UART1_BASE, 0x1040);
 
36
        tmp[1] = wmt_irq_res(IRQ_UART1);
 
37
        wmt_res_add(&vt8500_device_uart1, tmp, 2);
 
38
 
 
39
        tmp[0] = wmt_mmio_res(VT8500_UART2_BASE, 0x1040);
 
40
        tmp[1] = wmt_irq_res(IRQ_UART2);
 
41
        wmt_res_add(&vt8500_device_uart2, tmp, 2);
 
42
 
 
43
        tmp[0] = wmt_mmio_res(VT8500_UART3_BASE, 0x1040);
 
44
        tmp[1] = wmt_irq_res(IRQ_UART3);
 
45
        wmt_res_add(&vt8500_device_uart3, tmp, 2);
 
46
 
 
47
        tmp[0] = wmt_mmio_res(VT8500_EHCI_BASE, SZ_512);
 
48
        tmp[1] = wmt_irq_res(IRQ_EHCI);
 
49
        wmt_res_add(&vt8500_device_ehci, tmp, 2);
 
50
 
 
51
        tmp[0] = wmt_mmio_res(VT8500_GEGEA_BASE, SZ_256);
 
52
        wmt_res_add(&vt8500_device_ge_rops, tmp, 1);
 
53
 
 
54
        tmp[0] = wmt_mmio_res(VT8500_PWM_BASE, 0x44);
 
55
        wmt_res_add(&vt8500_device_pwm, tmp, 1);
 
56
 
 
57
        tmp[0] = wmt_mmio_res(VT8500_RTC_BASE, 0x2c);
 
58
        tmp[1] = wmt_irq_res(IRQ_RTC);
 
59
        tmp[2] = wmt_irq_res(IRQ_RTCSM);
 
60
        wmt_res_add(&vt8500_device_rtc, tmp, 3);
 
61
}
 
62
 
 
63
static void __init vt8500_set_externs(void)
 
64
{
 
65
        /* Non-resource-aware stuff */
 
66
        wmt_ic_base = VT8500_IC_BASE;
 
67
        wmt_gpio_base = VT8500_GPIO_BASE;
 
68
        wmt_pmc_base = VT8500_PMC_BASE;
 
69
        wmt_i8042_base = VT8500_PS2_BASE;
 
70
 
 
71
        wmt_nr_irqs = VT8500_NR_IRQS;
 
72
        wmt_timer_irq = IRQ_PMCOS0;
 
73
        wmt_gpio_ext_irq[0] = IRQ_EXT0;
 
74
        wmt_gpio_ext_irq[1] = IRQ_EXT1;
 
75
        wmt_gpio_ext_irq[2] = IRQ_EXT2;
 
76
        wmt_gpio_ext_irq[3] = IRQ_EXT3;
 
77
        wmt_gpio_ext_irq[4] = IRQ_EXT4;
 
78
        wmt_gpio_ext_irq[5] = IRQ_EXT5;
 
79
        wmt_gpio_ext_irq[6] = IRQ_EXT6;
 
80
        wmt_gpio_ext_irq[7] = IRQ_EXT7;
 
81
        wmt_i8042_kbd_irq = IRQ_PS2KBD;
 
82
        wmt_i8042_aux_irq = IRQ_PS2MOUSE;
 
83
}
 
84
 
 
85
void __init vt8500_map_io(void)
 
86
{
 
87
        iotable_init(wmt_io_desc, ARRAY_SIZE(wmt_io_desc));
 
88
 
 
89
        /* Should be done before interrupts and timers are initialized */
 
90
        vt8500_set_externs();
 
91
}