forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/arm/mach-ixp4xx/nslu2-setup.c
....@@ -32,6 +32,8 @@
3232 #include <asm/mach/flash.h>
3333 #include <asm/mach/time.h>
3434
35
+#include "irqs.h"
36
+
3537 #define NSLU2_SDA_PIN 7
3638 #define NSLU2_SCL_PIN 6
3739
....@@ -125,10 +127,18 @@
125127 },
126128 };
127129
130
+static struct resource nslu2_beeper_resources[] = {
131
+ {
132
+ .start = IRQ_IXP4XX_TIMER2,
133
+ .flags = IORESOURCE_IRQ,
134
+ },
135
+};
136
+
128137 static struct platform_device nslu2_beeper = {
129138 .name = "ixp4xx-beeper",
130139 .id = NSLU2_GPIO_BUZZ,
131
- .num_resources = 0,
140
+ .resource = nslu2_beeper_resources,
141
+ .num_resources = ARRAY_SIZE(nslu2_beeper_resources),
132142 };
133143
134144 static struct resource nslu2_uart_resources[] = {
....@@ -175,6 +185,14 @@
175185 };
176186
177187 /* Built-in 10/100 Ethernet MAC interfaces */
188
+static struct resource nslu2_eth_resources[] = {
189
+ {
190
+ .start = IXP4XX_EthB_BASE_PHYS,
191
+ .end = IXP4XX_EthB_BASE_PHYS + 0x0fff,
192
+ .flags = IORESOURCE_MEM,
193
+ },
194
+};
195
+
178196 static struct eth_plat_info nslu2_plat_eth[] = {
179197 {
180198 .phy = 1,
....@@ -188,6 +206,8 @@
188206 .name = "ixp4xx_eth",
189207 .id = IXP4XX_ETH_NPEB,
190208 .dev.platform_data = nslu2_plat_eth,
209
+ .num_resources = ARRAY_SIZE(nslu2_eth_resources),
210
+ .resource = nslu2_eth_resources,
191211 }
192212 };
193213