sh: Add I/O DATA HDL-U support drivers.
Subsystems (4)
Yoshinori Sato
maintainerPATCH 9/12 sh: Add I/O DATA HDL-U support drivers.
PCI host fixup and external interrupt controller.
Signed-off-by Yoshinori Sato <[email protected]>
--- .../interrupt-controller/iodata-landisk.txt | 28 +++++++++ drivers/irqchip/irq-io-landisk.c | 71 ++++++++++++++++++++++ drivers/pci/host/pci-sh7751.c | 25 ++++++++ 3 files changed, 124 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt create mode 100644 drivers/irqchip/irq-io-landisk.c
Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt new file +28 -0
@@ -0,0 +1,28 @@ +DT bindings for the I/O DATA HDL-U interrupt controler + +Required properties: + + - compatible: has to be "iodata,landisk-intc". + + - reg: Base address and length of interrupt controller register. + + - interrupt-controller: Identifies the node as an interrupt controller. + + - #interrupt-cells: has to be <2>: an interrupt index and flags, as defined + in interrupts.txt in this directory. + + - interrupt-map: Interrupt mapping on parent controler. + +Example +------- + + cpldintc: cpld@b0000000 { + compatible = "iodata,landisk-intc"; + #interrupt-cells = <2>; + interrupt-controller; + reg = <0xb0000000 8>; + interrupt-map=<0 &shintc 0 0>, <1 &shintc 1 0>, + <2 &shintc 2 0>, <3 &shintc 3 0>, + <4 &shintc 4 0>, <5 &shintc 5 0>, + <6 &shintc 6 0>, <7 &shintc 7 0>; + };
drivers/irqchip/irq-io-landisk.c new file +71 -0
71 lines not on this page · raw message
drivers/pci/host/pci-sh7751.c +25 -0
@@ -26,10 +26,35 @@ DEFINE_RAW_SPINLOCK(pci_config_lock);* PCIC fixups */ +#define PCIMCR_MRSET 0x40000000 +#define PCIMCR_RFSH 0x00000004 + +static void __init landisk_fixup (void __iomem *pci_reg_base,void __iomem *bcr) +{ +unsigned long bcr1, mcr; + + bcr1 =__raw_readl (bcr +SH7751_BCR1 ); + bcr1 |=0x00080000 ;/* Enable Bit 19 BREQEN, set PCIC to slave */ +pcic_writel (bcr1,SH4_PCIBCR1 ); + + mcr =__raw_readl (bcr +SH7751_MCR ); + mcr &= (~PCIMCR_MRSET ) & (~PCIMCR_RFSH ); +pcic_writel (mcr,SH4_PCIMCR ); + +pcic_writel (0x0c000000 ,SH7751_PCICONF5 ); +pcic_writel (0xd0000000 ,SH7751_PCICONF6 ); +pcic_writel (0x0c000000 ,SH4_PCILAR0 ); +pcic_writel (0x00000000 ,SH4_PCILAR1 ); +} +static __initconst const struct fixups {char *compatible;void (*fixup)(void __iomem *,void __iomem *); } fixup_list[] = { + { + .compatible ="iodata,landisk" , + .fixup = landisk_fixup, + }, }; static __init void pcic_fixups(struct device_node *np,
Signature · 1 line
2.7.0