forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/arch/arm/mach-ixp4xx/goramo_mlr.c
....@@ -11,12 +11,15 @@
1111 #include <linux/irq.h>
1212 #include <linux/kernel.h>
1313 #include <linux/pci.h>
14
+#include <linux/platform_data/wan_ixp4xx_hss.h>
1415 #include <linux/serial_8250.h>
1516 #include <asm/mach-types.h>
1617 #include <asm/mach/arch.h>
1718 #include <asm/mach/flash.h>
1819 #include <asm/mach/pci.h>
1920 #include <asm/system_info.h>
21
+
22
+#include "irqs.h"
2023
2124 #define SLOT_ETHA 0x0B /* IDSEL = AD21 */
2225 #define SLOT_ETHB 0x0C /* IDSEL = AD20 */
....@@ -270,6 +273,22 @@
270273
271274
272275 /* Built-in 10/100 Ethernet MAC interfaces */
276
+static struct resource eth_npeb_resources[] = {
277
+ {
278
+ .start = IXP4XX_EthB_BASE_PHYS,
279
+ .end = IXP4XX_EthB_BASE_PHYS + 0x0fff,
280
+ .flags = IORESOURCE_MEM,
281
+ },
282
+};
283
+
284
+static struct resource eth_npec_resources[] = {
285
+ {
286
+ .start = IXP4XX_EthC_BASE_PHYS,
287
+ .end = IXP4XX_EthC_BASE_PHYS + 0x0fff,
288
+ .flags = IORESOURCE_MEM,
289
+ },
290
+};
291
+
273292 static struct eth_plat_info eth_plat[] = {
274293 {
275294 .phy = 0,
....@@ -287,10 +306,14 @@
287306 .name = "ixp4xx_eth",
288307 .id = IXP4XX_ETH_NPEB,
289308 .dev.platform_data = eth_plat,
309
+ .num_resources = ARRAY_SIZE(eth_npeb_resources),
310
+ .resource = eth_npeb_resources,
290311 }, {
291312 .name = "ixp4xx_eth",
292313 .id = IXP4XX_ETH_NPEC,
293314 .dev.platform_data = eth_plat + 1,
315
+ .num_resources = ARRAY_SIZE(eth_npec_resources),
316
+ .resource = eth_npec_resources,
294317 }
295318 };
296319
....@@ -403,6 +426,9 @@
403426 if (hw_bits & CFG_HW_HAS_HSS1)
404427 device_tab[devices++] = &device_hss_tab[1]; /* max index 5 */
405428
429
+ hss_plat[0].timer_freq = ixp4xx_timer_freq;
430
+ hss_plat[1].timer_freq = ixp4xx_timer_freq;
431
+
406432 gpio_request(GPIO_SCL, "SCL/clock");
407433 gpio_request(GPIO_SDA, "SDA/data");
408434 gpio_request(GPIO_STR, "strobe");