summaryrefslogtreecommitdiff
path: root/target/linux/cns3xxx/patches/100-laguna_support.patch
diff options
context:
space:
mode:
authorkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-06-28 06:54:20 +0000
committerkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-06-28 06:54:20 +0000
commit62588ba2fadc712510b3f858aef8ace2d93e33fa (patch)
treefad168e1d3a6f40aa9a76c42cd7049d5abac51e0 /target/linux/cns3xxx/patches/100-laguna_support.patch
parentd44b8ff5e35f6aeb9e2a30f1a844720396e1bb74 (diff)
[cns3xxx]: ethernet cleanup and sata fix - thanks, Chris
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27297 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/cns3xxx/patches/100-laguna_support.patch')
-rw-r--r--target/linux/cns3xxx/patches/100-laguna_support.patch104
1 files changed, 97 insertions, 7 deletions
diff --git a/target/linux/cns3xxx/patches/100-laguna_support.patch b/target/linux/cns3xxx/patches/100-laguna_support.patch
index 574b8b3918..416b939457 100644
--- a/target/linux/cns3xxx/patches/100-laguna_support.patch
+++ b/target/linux/cns3xxx/patches/100-laguna_support.patch
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/arch/arm/mach-cns3xxx/laguna.c
-@@ -0,0 +1,671 @@
+@@ -0,0 +1,761 @@
+/*
+ * Gateworks Corporation Laguna Platform
+ *
@@ -201,11 +201,91 @@
+ .name = "user2", /* Red Led */
+ .gpio = 114,
+ .active_low = 1,
++ },{
++ .name = "pwr1", /* Green Led */
++ .gpio = 116,
++ .active_low = 1,
++ },{
++ .name = "pwr2", /* Yellow Led */
++ .gpio = 117,
++ .active_low = 1,
++ },{
++ .name = "txd1", /* Green Led */
++ .gpio = 118,
++ .active_low = 1,
++ },{
++ .name = "txd2", /* Yellow Led */
++ .gpio = 119,
++ .active_low = 1,
++ },{
++ .name = "rxd1", /* Green Led */
++ .gpio = 120,
++ .active_low = 1,
++ },{
++ .name = "rxd2", /* Yellow Led */
++ .gpio = 121,
++ .active_low = 1,
++ },{
++ .name = "ser1", /* Green Led */
++ .gpio = 122,
++ .active_low = 1,
++ },{
++ .name = "ser2", /* Yellow Led */
++ .gpio = 123,
++ .active_low = 1,
++ },{
++ .name = "enet1", /* Green Led */
++ .gpio = 124,
++ .active_low = 1,
++ },{
++ .name = "enet2", /* Yellow Led */
++ .gpio = 125,
++ .active_low = 1,
++ },{
++ .name = "sig1_1", /* Green Led */
++ .gpio = 126,
++ .active_low = 1,
++ },{
++ .name = "sig1_2", /* Yellow Led */
++ .gpio = 127,
++ .active_low = 1,
++ },{
++ .name = "sig2_1", /* Green Led */
++ .gpio = 128,
++ .active_low = 1,
++ },{
++ .name = "sig2_2", /* Yellow Led */
++ .gpio = 129,
++ .active_low = 1,
++ },{
++ .name = "sig3_1", /* Green Led */
++ .gpio = 130,
++ .active_low = 1,
++ },{
++ .name = "sig3_2", /* Yellow Led */
++ .gpio = 131,
++ .active_low = 1,
++ },{
++ .name = "net1", /*Green Led */
++ .gpio = 109,
++ .active_low = 1,
++ },{
++ .name = "net2", /* Red Led */
++ .gpio = 110,
++ .active_low = 1,
++ },{
++ .name = "mod1", /* Green Led */
++ .gpio = 111,
++ .active_low = 1,
++ },{
++ .name = "mod2", /* Red Led */
++ .gpio = 112,
++ .active_low = 1,
+ },
+};
+
+static struct gpio_led_platform_data laguna_gpio_leds_data = {
-+ .num_leds = 2,
++ .num_leds = 22,
+ .leds = laguna_gpio_leds,
+};
+
@@ -446,6 +526,12 @@
+
+static struct pca953x_platform_data laguna_pca_data = {
+ .gpio_base = 100,
++ .irq_base = -1,
++};
++
++static struct pca953x_platform_data laguna_pca2_data = {
++ .gpio_base = 116,
++ .irq_base = -1,
+};
+
+static struct i2c_board_info __initdata laguna_i2c_devices[] = {
@@ -453,6 +539,9 @@
+ I2C_BOARD_INFO("pca9555", 0x23),
+ .platform_data = &laguna_pca_data,
+ },{
++ I2C_BOARD_INFO("pca9555", 0x27),
++ .platform_data = &laguna_pca2_data,
++ },{
+ I2C_BOARD_INFO("gsp", 0x29),
+ },{
+ I2C_BOARD_INFO ("24c08",0x50),
@@ -548,7 +637,8 @@
+ if (laguna_net_data.ports)
+ platform_device_register(&laguna_net_device);
+
-+ if (laguna_info.config_bitmap & (SATA0_LOAD | SATA1_LOAD))
++ if ((laguna_info.config_bitmap & SATA0_LOAD) ||
++ (laguna_info.config_bitmap & SATA1_LOAD))
+ cns3xxx_ahci_init();
+
+ if (laguna_info.config_bitmap & (PCIE0_LOAD))
@@ -640,9 +730,9 @@
+ spi_register_board_info(laguna_spi_devices, ARRAY_SIZE(laguna_spi_devices));
+ }
+
-+ if (laguna_info.config_bitmap & (SPI0_LOAD | SPI1_LOAD)) {
++ if ((laguna_info.config_bitmap & SPI0_LOAD) ||
++ (laguna_info.config_bitmap & SPI1_LOAD))
+ platform_device_register(&laguna_spi_controller);
-+ }
+
+ /*
+ * Do any model specific setup not known by the bitmap by matching
@@ -650,13 +740,13 @@
+ */
+
+ if (strncmp(laguna_info.model, "GW2388", 6) == 0) {
-+ platform_device_register(&laguna_gpio_leds_device);
++ laguna_gpio_leds_data.num_leds = 2;
+ } else if (strncmp(laguna_info.model, "GW2380", 6) == 0) {
+ laguna_gpio_leds[0].gpio = 107;
+ laguna_gpio_leds[1].gpio = 106;
+ laguna_gpio_leds_data.num_leds = 2;
-+ platform_device_register(&laguna_gpio_leds_device);
+ }
++ platform_device_register(&laguna_gpio_leds_device);
+ } else {
+ // Do some defaults here, not sure what yet
+ }