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

« back to all changes in this revision

Viewing changes to arch/m68knommu/platform/54xx/config.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
 
/***************************************************************************/
2
 
 
3
 
/*
4
 
 *      linux/arch/m68knommu/platform/54xx/config.c
5
 
 *
6
 
 *      Copyright (C) 2010, Philippe De Muyter <phdm@macqel.be>
7
 
 */
8
 
 
9
 
/***************************************************************************/
10
 
 
11
 
#include <linux/kernel.h>
12
 
#include <linux/param.h>
13
 
#include <linux/init.h>
14
 
#include <linux/interrupt.h>
15
 
#include <linux/io.h>
16
 
#include <asm/machdep.h>
17
 
#include <asm/coldfire.h>
18
 
#include <asm/m54xxsim.h>
19
 
#include <asm/mcfuart.h>
20
 
#include <asm/m54xxgpt.h>
21
 
 
22
 
/***************************************************************************/
23
 
 
24
 
static struct mcf_platform_uart m54xx_uart_platform[] = {
25
 
        {
26
 
                .mapbase        = MCF_MBAR + MCFUART_BASE1,
27
 
                .irq            = 64 + 35,
28
 
        },
29
 
        {
30
 
                .mapbase        = MCF_MBAR + MCFUART_BASE2,
31
 
                .irq            = 64 + 34,
32
 
        },
33
 
        {
34
 
                .mapbase        = MCF_MBAR + MCFUART_BASE3,
35
 
                .irq            = 64 + 33,
36
 
        },
37
 
        {
38
 
                .mapbase        = MCF_MBAR + MCFUART_BASE4,
39
 
                .irq            = 64 + 32,
40
 
        },
41
 
};
42
 
 
43
 
static struct platform_device m54xx_uart = {
44
 
        .name                   = "mcfuart",
45
 
        .id                     = 0,
46
 
        .dev.platform_data      = m54xx_uart_platform,
47
 
};
48
 
 
49
 
static struct platform_device *m54xx_devices[] __initdata = {
50
 
        &m54xx_uart,
51
 
};
52
 
 
53
 
 
54
 
/***************************************************************************/
55
 
 
56
 
static void __init m54xx_uart_init_line(int line, int irq)
57
 
{
58
 
        int rts_cts;
59
 
 
60
 
        /* enable io pins */
61
 
        switch (line) {
62
 
        case 0:
63
 
                rts_cts = 0; break;
64
 
        case 1:
65
 
                rts_cts = MCF_PAR_PSC_RTS_RTS; break;
66
 
        case 2:
67
 
                rts_cts = MCF_PAR_PSC_RTS_RTS | MCF_PAR_PSC_CTS_CTS; break;
68
 
        case 3:
69
 
                rts_cts = 0; break;
70
 
        }
71
 
        __raw_writeb(MCF_PAR_PSC_TXD | rts_cts | MCF_PAR_PSC_RXD,
72
 
                                                MCF_MBAR + MCF_PAR_PSC(line));
73
 
}
74
 
 
75
 
static void __init m54xx_uarts_init(void)
76
 
{
77
 
        const int nrlines = ARRAY_SIZE(m54xx_uart_platform);
78
 
        int line;
79
 
 
80
 
        for (line = 0; (line < nrlines); line++)
81
 
                m54xx_uart_init_line(line, m54xx_uart_platform[line].irq);
82
 
}
83
 
 
84
 
/***************************************************************************/
85
 
 
86
 
static void mcf54xx_reset(void)
87
 
{
88
 
        /* disable interrupts and enable the watchdog */
89
 
        asm("movew #0x2700, %sr\n");
90
 
        __raw_writel(0, MCF_MBAR + MCF_GPT_GMS0);
91
 
        __raw_writel(MCF_GPT_GCIR_CNT(1), MCF_MBAR + MCF_GPT_GCIR0);
92
 
        __raw_writel(MCF_GPT_GMS_WDEN | MCF_GPT_GMS_CE | MCF_GPT_GMS_TMS(4),
93
 
                                                MCF_MBAR + MCF_GPT_GMS0);
94
 
}
95
 
 
96
 
/***************************************************************************/
97
 
 
98
 
void __init config_BSP(char *commandp, int size)
99
 
{
100
 
        mach_reset = mcf54xx_reset;
101
 
        m54xx_uarts_init();
102
 
}
103
 
 
104
 
/***************************************************************************/
105
 
 
106
 
static int __init init_BSP(void)
107
 
{
108
 
 
109
 
        platform_add_devices(m54xx_devices, ARRAY_SIZE(m54xx_devices));
110
 
        return 0;
111
 
}
112
 
 
113
 
arch_initcall(init_BSP);
114
 
 
115
 
/***************************************************************************/