Skip to content

sh: clean up pci code

Magnus Damm linux-sh 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9sh: pass along struct pci_channelarch/sh/drivers/pci/fixups-lboxre2.c arch/sh/drivers/pci/fixups-r7780rp.c arch/sh/drivers/pci/fixups-rts7751r2d.c +16 more+167 -1520 replies
2/9sh: add init member to pci_channel dataarch/sh/boards/dreamcast/setup.c arch/sh/drivers/pci/ops-cayman.c arch/sh/drivers/pci/ops-dreamcast.c +17 more+56 -410 replies
3/9sh: avoid using PCIBIOS_MIN_xxxarch/sh/drivers/pci/fixups-r7780rp.c arch/sh/drivers/pci/fixups-sdk7780.c arch/sh/drivers/pci/fixups-se7780.c +3 more+19 -200 replies
4/9sh: hook in struct pci_channel in sysdataarch/sh/drivers/pci/ops-sh4.c arch/sh/drivers/pci/pci-auto.c include/asm-sh/pci.h+12 -70 replies
5/9sh: add reg_base member to pci_channelarch/sh/drivers/pci/ops-sh4.c arch/sh/drivers/pci/pci-sh4.h arch/sh/drivers/pci/pci-sh7751.c +4 more+9 -60 replies
6/9sh: add io_base member to pci_channelarch/sh/drivers/pci/pci-sh7751.c arch/sh/drivers/pci/pci-sh7780.c include/asm-sh/pci.h+7 -40 replies
7/9sh: pci memory range checking codearch/sh/boards/titan/io.c arch/sh/drivers/pci/pci.c arch/sh/mm/ioremap_32.c +1 more+24 -100 replies
8/9sh: pci io port base address codearch/sh/drivers/pci/ops-rts7751r2d.c arch/sh/kernel/io.c include/asm-sh/pci.h+25 -280 replies
9/9sh: export board_pci_channels in one placearch/sh/drivers/pci/ops-cayman.c arch/sh/drivers/pci/ops-lboxre2.c arch/sh/drivers/pci/ops-r7780rp.c +5 more+2 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/09] sh: clean up pci code

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.

Only high level stuff so far. These patches avoid changing low level bits, I have patches for sh7751 and sh7780 doing that already. I'll post then later on this week after some more testing.

Have fun and people with pci host controllers - please test!

/ magnus

 arch/sh/boards/dreamcast/setup.c        |    6 -
 arch/sh/boards/titan/io.c               |    2 
 arch/sh/drivers/pci/fixups-lboxre2.c    |   23 +++----
 arch/sh/drivers/pci/fixups-r7780rp.c    |   35 +++++-----
 arch/sh/drivers/pci/fixups-rts7751r2d.c |   23 +++----
 arch/sh/drivers/pci/fixups-sdk7780.c    |   52 ++++++++--------
 arch/sh/drivers/pci/fixups-se7780.c     |   36 +++++------
 arch/sh/drivers/pci/ops-cayman.c        |    3 
 arch/sh/drivers/pci/ops-dreamcast.c     |   17 ++---
 arch/sh/drivers/pci/ops-landisk.c       |    4 -
 arch/sh/drivers/pci/ops-lboxre2.c       |    6 -
 arch/sh/drivers/pci/ops-r7780rp.c       |    5 -
 arch/sh/drivers/pci/ops-rts7751r2d.c    |    6 -
 arch/sh/drivers/pci/ops-sdk7780.c       |    5 -
 arch/sh/drivers/pci/ops-se7780.c        |    5 -
 arch/sh/drivers/pci/ops-sh03.c          |    2 
 arch/sh/drivers/pci/ops-sh4.c           |   40 ++++++------
 arch/sh/drivers/pci/ops-snapgear.c      |    4 -
 arch/sh/drivers/pci/ops-titan.c         |    5 -
 arch/sh/drivers/pci/pci-auto.c          |    1 
 arch/sh/drivers/pci/pci-sh4.h           |   15 ++--
 arch/sh/drivers/pci/pci-sh5.c           |   15 +++-
 arch/sh/drivers/pci/pci-sh5.h           |    1 
 arch/sh/drivers/pci/pci-sh7751.c        |  100 +++++++++++++++----------------
 arch/sh/drivers/pci/pci-sh7751.h        |    5 -
 arch/sh/drivers/pci/pci-sh7780.c        |   57 ++++++++---------
 arch/sh/drivers/pci/pci-sh7780.h        |    5 -
 arch/sh/drivers/pci/pci.c               |   30 ++++++---
 arch/sh/kernel/io.c                     |    5 +
 arch/sh/mm/ioremap_32.c                 |    4 -
 include/asm-sh/pci.h                    |   80 ++++++++++++++----------
 31 files changed, 321 insertions(+), 276 deletions(-)