* [U-Boot-Users] [PATCH][RFC] pci: Divided pci code of the powerpc
@ 2008-06-17 7:38 Nobuhiro Iwamatsu
2008-06-30 4:39 ` Nobuhiro Iwamatsu
0 siblings, 1 reply; 5+ messages in thread
From: Nobuhiro Iwamatsu @ 2008-06-17 7:38 UTC (permalink / raw)
To: u-boot
A source code of pci is written mainly on powerpc.
Macro uses a pci source code of powerpc because other architecture
(ex. SuperH) doesn't work.
I made asm-ppc/pci.h and moved macro of pci.
Other archtecture need to make the following macro in asm-xxx/pci.h
#define pci_phys_to_mem(dev, addr) (addr)
#define pci_mem_to_phys(dev, addr) (addr)
#define pci_phys_to_io(dev, addr) (addr)
#define pci_io_to_phys(dev, addr) (addr)
Or have to make a function for pci address conversion.
However, I want comment because I do not know the other architecture.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
---
include/asm-ppc/pci.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++
include/asm-sh/pci.h | 5 ++++
include/pci.h | 22 +-------------------
3 files changed, 59 insertions(+), 21 deletions(-)
create mode 100644 include/asm-ppc/pci.h
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h
new file mode 100644
index 0000000..d5f8475
--- /dev/null
+++ b/include/asm-ppc/pci.h
@@ -0,0 +1,53 @@
+/*
+ * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
+ * Andreas Heppel <aheppel@sysgo.de>
+ *
+ * (C) Copyright 2002
+ * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * aloong with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _ASM_PCI_H
+#define _ASM_PCI_H
+
+extern phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose,
+ unsigned long addr, unsigned long flags);
+extern unsigned long pci_hose_phys_to_bus(struct pci_controller* hose,
+ phys_addr_t addr, unsigned long flags);
+
+#define pci_phys_to_bus(dev, addr, flags) \
+ pci_hose_phys_to_bus(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags))
+#define pci_bus_to_phys(dev, addr, flags) \
+ pci_hose_bus_to_phys(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags))
+
+#define pci_phys_to_mem(dev, addr) pci_phys_to_bus((dev), (addr), PCI_REGION_MEM)
+#define pci_mem_to_phys(dev, addr) pci_bus_to_phys((dev), (addr), PCI_REGION_MEM)
+#define pci_phys_to_io(dev, addr) pci_phys_to_bus((dev), (addr), PCI_REGION_IO)
+#define pci_io_to_phys(dev, addr) pci_bus_to_phys((dev), (addr), PCI_REGION_IO)
+
+#ifdef CONFIG_MPC824X
+extern void pci_mpc824x_init (struct pci_controller *hose);
+#endif
+
+#ifdef CONFIG_MPC85xx
+extern void pci_mpc85xx_init (struct pci_controller *hose);
+#endif
+
+#endif /* _ASM_PCI_H */
diff --git a/include/asm-sh/pci.h b/include/asm-sh/pci.h
index bc59491..1f24fb6 100644
--- a/include/asm-sh/pci.h
+++ b/include/asm-sh/pci.h
@@ -44,4 +44,9 @@ int pci_sh4_read_config_dword(struct pci_controller *hose,
int pci_sh4_write_config_dword(struct pci_controller *hose,
pci_dev_t dev, int offset, u32 value);
+#define pci_phys_to_mem(dev, addr) (addr)
+#define pci_mem_to_phys(dev, addr) (addr)
+#define pci_phys_to_io(dev, addr) (addr)
+#define pci_io_to_phys(dev, addr) (addr)
+
#endif /* _ASM_PCI_H_ */
diff --git a/include/pci.h b/include/pci.h
index 1c8e216..9b61635 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -432,21 +432,6 @@ extern __inline__ void pci_set_ops(struct pci_controller *hose,
extern void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data);
-extern phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose,
- unsigned long addr, unsigned long flags);
-extern unsigned long pci_hose_phys_to_bus(struct pci_controller* hose,
- phys_addr_t addr, unsigned long flags);
-
-#define pci_phys_to_bus(dev, addr, flags) \
- pci_hose_phys_to_bus(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags))
-#define pci_bus_to_phys(dev, addr, flags) \
- pci_hose_bus_to_phys(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags))
-
-#define pci_phys_to_mem(dev, addr) pci_phys_to_bus((dev), (addr), PCI_REGION_MEM)
-#define pci_mem_to_phys(dev, addr) pci_bus_to_phys((dev), (addr), PCI_REGION_MEM)
-#define pci_phys_to_io(dev, addr) pci_phys_to_bus((dev), (addr), PCI_REGION_IO)
-#define pci_io_to_phys(dev, addr) pci_bus_to_phys((dev), (addr), PCI_REGION_IO)
-
extern int pci_hose_read_config_byte(struct pci_controller *hose,
pci_dev_t dev, int where, u8 *val);
extern int pci_hose_read_config_word(struct pci_controller *hose,
@@ -503,11 +488,6 @@ extern int pci_hose_config_device(struct pci_controller *hose,
unsigned long mem,
unsigned long command);
-#ifdef CONFIG_MPC824X
-extern void pci_mpc824x_init (struct pci_controller *hose);
-#endif
+#include <asm/pci.h>
-#ifdef CONFIG_MPC85xx
-extern void pci_mpc85xx_init (struct pci_controller *hose);
-#endif
#endif /* _PCI_H */
--
1.5.5.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot-Users] [PATCH][RFC] pci: Divided pci code of the powerpc
2008-06-17 7:38 [U-Boot-Users] [PATCH][RFC] pci: Divided pci code of the powerpc Nobuhiro Iwamatsu
@ 2008-06-30 4:39 ` Nobuhiro Iwamatsu
2008-08-08 7:11 ` Nobuhiro Iwamatsu
0 siblings, 1 reply; 5+ messages in thread
From: Nobuhiro Iwamatsu @ 2008-06-30 4:39 UTC (permalink / raw)
To: u-boot
Hi, all.
Could comment about this patch.
Best regards,
Nobuhiro
Nobuhiro Iwamatsu wrote:
> A source code of pci is written mainly on powerpc.
> Macro uses a pci source code of powerpc because other architecture
> (ex. SuperH) doesn't work.
>
> I made asm-ppc/pci.h and moved macro of pci.
> Other archtecture need to make the following macro in asm-xxx/pci.h
> #define pci_phys_to_mem(dev, addr) (addr)
> #define pci_mem_to_phys(dev, addr) (addr)
> #define pci_phys_to_io(dev, addr) (addr)
> #define pci_io_to_phys(dev, addr) (addr)
>
> Or have to make a function for pci address conversion.
> However, I want comment because I do not know the other architecture.
>
> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] [PATCH][RFC] pci: Divided pci code of the powerpc
2008-06-30 4:39 ` Nobuhiro Iwamatsu
@ 2008-08-08 7:11 ` Nobuhiro Iwamatsu
2008-08-10 22:22 ` [U-Boot] " Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Nobuhiro Iwamatsu @ 2008-08-08 7:11 UTC (permalink / raw)
To: u-boot
Hi, all.
Please pickup this RFC/patch.
Best regards,
Nobuhiro
2008/6/30 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>:
> Hi, all.
>
> Could comment about this patch.
>
> Best regards,
> Nobuhiro
>
> Nobuhiro Iwamatsu wrote:
>> A source code of pci is written mainly on powerpc.
>> Macro uses a pci source code of powerpc because other architecture
>> (ex. SuperH) doesn't work.
>>
>> I made asm-ppc/pci.h and moved macro of pci.
>> Other archtecture need to make the following macro in asm-xxx/pci.h
>> #define pci_phys_to_mem(dev, addr) (addr)
>> #define pci_mem_to_phys(dev, addr) (addr)
>> #define pci_phys_to_io(dev, addr) (addr)
>> #define pci_io_to_phys(dev, addr) (addr)
>>
>> Or have to make a function for pci address conversion.
>> However, I want comment because I do not know the other architecture.
>>
>> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [U-Boot-Users] [PATCH][RFC] pci: Divided pci code of the powerpc
2008-08-08 7:11 ` Nobuhiro Iwamatsu
@ 2008-08-10 22:22 ` Wolfgang Denk
2008-08-25 8:10 ` Nobuhiro Iwamatsu
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2008-08-10 22:22 UTC (permalink / raw)
To: u-boot
Dear "Nobuhiro Iwamatsu",
In message <29ab51dc0808080011n5b724baev350fa9c8f7c7315b@mail.gmail.com> you wrote:
>
> Please pickup this RFC/patch.
What do you mean by "pick up"? Is it a RFC, or is it supposed to be a
patch? If the latter, then please rebase and resubmit (without the
RFC in the subject).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We don't have to protect the environment -- the Second Coming is at
hand." - James Watt
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [U-Boot-Users] [PATCH][RFC] pci: Divided pci code of the powerpc
2008-08-10 22:22 ` [U-Boot] " Wolfgang Denk
@ 2008-08-25 8:10 ` Nobuhiro Iwamatsu
0 siblings, 0 replies; 5+ messages in thread
From: Nobuhiro Iwamatsu @ 2008-08-25 8:10 UTC (permalink / raw)
To: u-boot
Hi, Wolfgang .
2008/8/11 Wolfgang Denk <wd@denx.de>:
> Dear "Nobuhiro Iwamatsu",
>
> In message <29ab51dc0808080011n5b724baev350fa9c8f7c7315b@mail.gmail.com> you wrote:
>>
>> Please pickup this RFC/patch.
>
> What do you mean by "pick up"? Is it a RFC, or is it supposed to be a
> patch? If the latter, then please rebase and resubmit (without the
> RFC in the subject).
It meant "RFC".
However, I resubmit it to this email as a patch again because there is
not comment.
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-25 8:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-17 7:38 [U-Boot-Users] [PATCH][RFC] pci: Divided pci code of the powerpc Nobuhiro Iwamatsu
2008-06-30 4:39 ` Nobuhiro Iwamatsu
2008-08-08 7:11 ` Nobuhiro Iwamatsu
2008-08-10 22:22 ` [U-Boot] " Wolfgang Denk
2008-08-25 8:10 ` Nobuhiro Iwamatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox