aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf561/boards/tepla.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-04-07 02:53:30 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-07 02:53:30 -0400
commit4a35ecf8bf1c4b039503fa554100fe85c761de76 (patch)
tree9b75f5d5636004d9a9aa496924377379be09aa1f /arch/blackfin/mach-bf561/boards/tepla.c
parentb4d562e3c3553ac58c7120555c4e4aefbb090a2a (diff)
parentfb9e2d887243499b8d28efcf80821c4f6a092395 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/bonding/bond_main.c drivers/net/via-velocity.c drivers/net/wireless/iwlwifi/iwl-agn.c
Diffstat (limited to 'arch/blackfin/mach-bf561/boards/tepla.c')
-rw-r--r--arch/blackfin/mach-bf561/boards/tepla.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c
index 8ba7252455e1..d3017e53686b 100644
--- a/arch/blackfin/mach-bf561/boards/tepla.c
+++ b/arch/blackfin/mach-bf561/boards/tepla.c
@@ -42,6 +42,52 @@ static struct platform_device smc91x_device = {
42 .resource = smc91x_resources, 42 .resource = smc91x_resources,
43}; 43};
44 44
45#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
46#ifdef CONFIG_SERIAL_BFIN_UART0
47static struct resource bfin_uart0_resources[] = {
48 {
49 .start = BFIN_UART_THR,
50 .end = BFIN_UART_GCTL+2,
51 .flags = IORESOURCE_MEM,
52 },
53 {
54 .start = IRQ_UART_RX,
55 .end = IRQ_UART_RX+1,
56 .flags = IORESOURCE_IRQ,
57 },
58 {
59 .start = IRQ_UART_ERROR,
60 .end = IRQ_UART_ERROR,
61 .flags = IORESOURCE_IRQ,
62 },
63 {
64 .start = CH_UART_TX,
65 .end = CH_UART_TX,
66 .flags = IORESOURCE_DMA,
67 },
68 {
69 .start = CH_UART_RX,
70 .end = CH_UART_RX,
71 .flags = IORESOURCE_DMA,
72 },
73};
74
75unsigned short bfin_uart0_peripherals[] = {
76 P_UART0_TX, P_UART0_RX, 0
77};
78
79static struct platform_device bfin_uart0_device = {
80 .name = "bfin-uart",
81 .id = 0,
82 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
83 .resource = bfin_uart0_resources,
84 .dev = {
85 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
86 },
87};
88#endif
89#endif
90
45#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 91#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
46#ifdef CONFIG_BFIN_SIR0 92#ifdef CONFIG_BFIN_SIR0
47static struct resource bfin_sir0_resources[] = { 93static struct resource bfin_sir0_resources[] = {
@@ -73,6 +119,13 @@ static struct platform_device bfin_sir0_device = {
73 119
74static struct platform_device *tepla_devices[] __initdata = { 120static struct platform_device *tepla_devices[] __initdata = {
75 &smc91x_device, 121 &smc91x_device,
122
123#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
124#ifdef CONFIG_SERIAL_BFIN_UART0
125 &bfin_uart0_device,
126#endif
127#endif
128
76#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 129#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
77#ifdef CONFIG_BFIN_SIR0 130#ifdef CONFIG_BFIN_SIR0
78 &bfin_sir0_device, 131 &bfin_sir0_device,
@@ -87,3 +140,18 @@ static int __init tepla_init(void)
87} 140}
88 141
89arch_initcall(tepla_init); 142arch_initcall(tepla_init);
143
144static struct platform_device *tepla_early_devices[] __initdata = {
145#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
146#ifdef CONFIG_SERIAL_BFIN_UART0
147 &bfin_uart0_device,
148#endif
149#endif
150};
151
152void __init native_machine_early_platform_add_devices(void)
153{
154 printk(KERN_INFO "register early platform devices\n");
155 early_platform_add_devices(tepla_early_devices,
156 ARRAY_SIZE(tepla_early_devices));
157}