summaryrefslogtreecommitdiff
path: root/arch/sh/drivers/pci/pci-sh4.h
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-03-11 15:41:51 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-04-16 16:00:12 +0900
commitb8b47bfbe4eb1ae0e6891e49c86a5f4fb00413be (patch)
treeea54e39235d29b7f96fd24611ff507dfdaa1d178 /arch/sh/drivers/pci/pci-sh4.h
parent3ee8da87ba6151ec91b2b8bbd27633bb248ea0d5 (diff)
sh: pass along struct pci_channel
These patches rework the pci code for the sh architecture. Currently each board implements some kind of ioport to address mapping. Some boards use generic_io_base others try passing addresses as io ports. This is the first set of patches that try to unify the pci code as much as possible to avoid duplicated code. This will in the end lead to fewer lines board specific code and more generic code. This patch makes sure a struct pci_channel pointer is passed along to various pci functions such as pci_read_reg(), pci_write_reg(), pci_fixup_pcic(), sh7751_pcic_init() and sh7780_pcic_init(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/pci-sh4.h')
-rw-r--r--arch/sh/drivers/pci/pci-sh4.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/sh/drivers/pci/pci-sh4.h b/arch/sh/drivers/pci/pci-sh4.h
index a83dcf70c13b..62ba35056087 100644
--- a/arch/sh/drivers/pci/pci-sh4.h
+++ b/arch/sh/drivers/pci/pci-sh4.h
@@ -154,8 +154,8 @@
/* arch/sh/kernel/drivers/pci/ops-sh4.c */
extern struct pci_ops sh4_pci_ops;
-int sh4_pci_check_direct(void);
-int pci_fixup_pcic(void);
+int sh4_pci_check_direct(struct pci_channel *chan);
+int pci_fixup_pcic(struct pci_channel *chan);
struct sh4_pci_address_space {
unsigned long base;
@@ -168,13 +168,16 @@ struct sh4_pci_address_map {
unsigned long flags;
};
-static inline void pci_write_reg(unsigned long val, unsigned long reg)
+static inline void pci_write_reg(struct pci_channel *chan,
+ unsigned long val, unsigned long reg)
{
ctrl_outl(val, PCI_REG(reg));
}
-static inline unsigned long pci_read_reg(unsigned long reg)
+static inline unsigned long pci_read_reg(struct pci_channel *chan,
+ unsigned long reg)
{
return ctrl_inl(PCI_REG(reg));
}
+
#endif /* __PCI_SH4_H */