sh: r2dplus: Switch to DM PCI driver
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Sat, 31 Aug 2019 16:25:21 +0000 (18:25 +0200)
committerMarek Vasut <marex@denx.de>
Mon, 2 Sep 2019 15:38:43 +0000 (17:38 +0200)
Add DT entry for the DM PCI driver, update board configs
and drop ad-hoc board init code for the PCI bus. Instead,
let the DM PCI driver initialize and operate the hardware.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
arch/sh/dts/sh7751-r2dplus.dts
board/renesas/r2dplus/r2dplus.c
configs/r2dplus_defconfig
include/configs/r2dplus.h

index 2d291bf1ee225fcdb4675a11618691884d60323d..ecaf0772d8fee550eb68b94203761a7e9e6b42db 100644 (file)
@@ -9,4 +9,18 @@
 / {
        model = "R2D";
        compatible = "renesas,r2d", "renesas,sh7751";
+
+       pci@fe200000 {
+               compatible = "renesas,pci-sh7751";
+               device_type = "pci";
+               reg = <0 0xfe200000 0 0x1000>;
+               status = "okay";
+
+               bus-range = <0 0>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               #interrupt-cells = <1>;
+               ranges = <0x01000000 0 0xfe240000 0 0xfe240000 0 0x00040000
+                         0x02000000 0 0xfd000000 0 0xfd000000 0 0x01000000>;
+       };
 };
index f0773267b102e1c73cf69836fa49a0b654266589..6eff98706f70f1362ed922608b7d54fd6fd0f470 100644 (file)
@@ -9,7 +9,6 @@
 #include <netdev.h>
 #include <asm/processor.h>
 #include <asm/io.h>
-#include <asm/pci.h>
 
 int checkboard(void)
 {
@@ -45,12 +44,6 @@ void ide_set_reset(int idereset)
        }
 }
 
-static struct pci_controller hose;
-void pci_init_board(void)
-{
-       pci_sh7751_init(&hose);
-}
-
 int board_eth_init(bd_t *bis)
 {
        return pci_eth_init(bis);
index 51a8587b61a2d3db8ef8cd2b80caa805b7cb667b..b2334affc3e878b17479786fc73a2ea9883a4e5f 100644 (file)
@@ -25,5 +25,7 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_RTL8139=y
 CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_USE_PRIVATE_LIBGCC=y
index e10de1b92079ef8a2d3773b1e3fb8aa5efe505ca..0b16fb0f64ec67c38d098fa712217005da16cca5 100644 (file)
 /*
  * SuperH PCI Bridge Configration
  */
-#define CONFIG_SH4_PCI
 #define CONFIG_SH7751_PCI
-#define CONFIG_PCI_SCAN_SHOW   1
-#define __mem_pci
-
-#define CONFIG_PCI_MEM_BUS     0xFD000000      /* Memory space base addr */
-#define CONFIG_PCI_MEM_PHYS    CONFIG_PCI_MEM_BUS
-#define CONFIG_PCI_MEM_SIZE    0x01000000      /* Size of Memory window */
-#define CONFIG_PCI_IO_BUS      0xFE240000      /* IO space base address */
-#define CONFIG_PCI_IO_PHYS     CONFIG_PCI_IO_BUS
-#define CONFIG_PCI_IO_SIZE     0x00040000      /* Size of IO window */
-#define CONFIG_PCI_SYS_BUS     CONFIG_SYS_SDRAM_BASE
-#define CONFIG_PCI_SYS_PHYS    CONFIG_SYS_SDRAM_BASE
-#define CONFIG_PCI_SYS_SIZE    CONFIG_SYS_SDRAM_SIZE
 
 #endif /* __CONFIG_H */