I have new e-mail address. Thanks to Kaloz ;)
[openwrt.git] / target / linux / adm5120-2.6 / files / arch / mips / adm5120 / platform.c
index 4459882..a79893d 100644 (file)
@@ -4,7 +4,7 @@
  *  Generic ADM5120 platform devices
  *
  *  Copyright (C) 2007 OpenWrt.org
- *  Copyright (C) 2007 Gabor Juhos <juhosg@freemail.hu>
+ *  Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
  *
  *  This program is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU General Public License
 #include <asm/mach-adm5120/adm5120_switch.h>
 #include <asm/mach-adm5120/adm5120_platform.h>
 
+static void adm5120_uart_set_mctrl(struct amba_device *dev, void __iomem *base,
+               unsigned int mctrl);
+
 #if 1
 /*
  * TODO:remove global adm5120_eth* variables when the switch driver will be
  *     converted into a real platform driver
  */
 unsigned int adm5120_eth_num_ports = 6;
+EXPORT_SYMBOL_GPL(adm5120_eth_num_ports);
+
 unsigned char adm5120_eth_macs[6][6] = {
        {'\00', 'A', 'D', 'M', '\x51', '\x20' },
        {'\00', 'A', 'D', 'M', '\x51', '\x21' },
@@ -52,9 +57,13 @@ unsigned char adm5120_eth_macs[6][6] = {
        {'\00', 'A', 'D', 'M', '\x51', '\x24' },
        {'\00', 'A', 'D', 'M', '\x51', '\x25' }
 };
-
-EXPORT_SYMBOL_GPL(adm5120_eth_num_ports);
 EXPORT_SYMBOL_GPL(adm5120_eth_macs);
+
+unsigned char adm5120_eth_vlans[6] = {
+       0x41, 0x42, 0x44, 0x48, 0x50, 0x60
+};
+EXPORT_SYMBOL_GPL(adm5120_eth_vlans);
+
 #else
 /* Built-in ethernet switch */
 struct adm5120_switch_platform_data adm5120_switch_data;
@@ -88,7 +97,7 @@ struct resource adm5120_usbc_resources[] = {
 };
 
 struct platform_device adm5120_usbc_device = {
-       .name           = "adm5120-usbc",
+       .name           = "adm5120-hcd",
        .id             = -1,
        .num_resources  = ARRAY_SIZE(adm5120_usbc_resources),
        .resource       = adm5120_usbc_resources,
@@ -114,7 +123,7 @@ struct platform_device adm5120_flash1_device =      {
 struct resource adm5120_nand_resource[] = {
        [0] = {
                .start  = ADM5120_SRAM1_BASE,
-               .end    = ADM5120_SRAM1_BASE+0x1000-1,
+               .end    = ADM5120_SRAM1_BASE+ADM5120_MPMC_SIZE-1,
                .flags  = IORESOURCE_MEM,
        },
 };
@@ -128,3 +137,45 @@ struct platform_device adm5120_nand_device = {
        .num_resources  = ARRAY_SIZE(adm5120_nand_resource),
        .resource       = adm5120_nand_resource,
 };
+
+/* built-in UARTs */
+struct amba_pl010_data adm5120_uart0_data = {
+       .set_mctrl = adm5120_uart_set_mctrl
+};
+
+struct amba_device adm5120_uart0_device = {
+       .dev            = {
+               .bus_id = "APB:UART0",
+               .platform_data = &adm5120_uart0_data,
+       },
+       .res            = {
+               .start  = ADM5120_UART0_BASE,
+               .end    = ADM5120_UART0_BASE + ADM5120_UART_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       .irq            = { ADM5120_IRQ_UART0, -1 },
+       .periphid       = 0x0041010,
+};
+
+struct amba_pl010_data adm5120_uart1_data = {
+       .set_mctrl = adm5120_uart_set_mctrl
+};
+
+struct amba_device adm5120_uart1_device = {
+       .dev            = {
+               .bus_id = "APB:UART1",
+               .platform_data = &adm5120_uart1_data,
+       },
+       .res            = {
+               .start  = ADM5120_UART1_BASE,
+               .end    = ADM5120_UART1_BASE + ADM5120_UART_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       .irq            = { ADM5120_IRQ_UART1, -1 },
+       .periphid       = 0x0041010,
+};
+
+static void adm5120_uart_set_mctrl(struct amba_device *dev, void __iomem *base,
+               unsigned int mctrl)
+{
+}
This page took 0.027488 seconds and 4 git commands to generate.