Skip to content

Clean up amba/primecell bus support

Russell King - ARM Linux linux-arm-kernel linux-devicetree linux-mmc linux-omap linux-samsung-soc 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest31 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/31ARM: amba: add amba_device allocation/add/put functionsdrivers/amba/bus.c include/linux/amba/bus.h+78 -250 replies
2/31ARM: amba: of: convert to use amba_device_allocdrivers/of/platform.c+3 -31 reply
3/31ARM: amba: ux500: convert to use amba_device_allocarch/arm/mach-ux500/devices-common.c+3 -92 replies
4/31ARM: amba: integrator: convert to use amba_device_allocarch/arm/mach-integrator/impd1.c+3 -60 replies
5/31ARM: amba: mxs: convert to use amba_device_allocarch/arm/mach-mxs/devices.c+5 -31 reply
5/31ARM: amba: mxs: convert to use amba_device_alloc+0 -00 replies
6/31ARM: amba: make irq 0 invaliddrivers/amba/bus.c drivers/mmc/host/mmci.c+3 -30 replies
7/31ARM: amba: ux500: get rid of NO_IRQarch/arm/mach-ux500/devices-common.c+0 -12 replies
8/31ARM: amba: get rid of NO_IRQ initializersarch/arm/mach-ep93xx/core.c+3 -30 replies
9/31ARM: amba: samsung: get rid of NO_IRQ initializersarch/arm/mach-exynos/dma.c arch/arm/mach-s5p64x0/dma.c arch/arm/mach-s5pc100/dma.c +1 more+7 -71 reply
10/31ARM: amba: integrator/realview/versatile/vexpress: get rid of NO_IRQ initializersarch/arm/mach-integrator/core.c arch/arm/mach-integrator/integrator_cp.c arch/arm/mach-realview/realview_eb.c +7 more+129 -1290 replies
11/31ARM: amba: lpc32xx: get rid of NO_IRQ initializersarch/arm/mach-lpc32xx/phy3250.c+2 -20 replies
12/31ARM: amba: mxs: get rid of NO_IRQ initializersarch/arm/mach-mxs/devices/amba-duart.c+1 -11 reply
13/31ARM: amba: nomadik: get rid of NO_IRQ initializersarch/arm/mach-nomadik/board-nhk8815.c+2 -22 replies
14/31ARM: amba: netx: get rid of NO_IRQ initializersarch/arm/mach-netx/fb.c+1 -10 replies
15/31ARM: amba: spear: get rid of NO_IRQ initializersarch/arm/mach-spear3xx/spear300.c arch/arm/mach-spear3xx/spear3xx.c arch/arm/mach-spear6xx/spear6xx.c+8 -81 reply
16/31ARM: amba: u300: get rid of NO_IRQ initializersarch/arm/mach-u300/core.c+3 -31 reply
17/31ARM: amba: make use of -1 IRQs warndrivers/amba/bus.c+3 -00 replies
18/31ARM: amba: provide common initializers for static amba devicesinclude/linux/amba/bus.h+33 -01 reply
19/31ARM: amba: vexpress: get rid of private platform amba_device initializerarch/arm/mach-vexpress/core.h arch/arm/mach-vexpress/ct-ca9x4.c arch/arm/mach-vexpress/v2m.c+14 -311 reply
20/31ARM: amba: versatile: get rid of private platform amba_device initializerarch/arm/mach-versatile/core.c arch/arm/mach-versatile/core.h arch/arm/mach-versatile/versatile_pb.c+28 -381 reply
21/31ARM: amba: realview: get rid of private platform amba_device initializerarch/arm/mach-realview/core.h arch/arm/mach-realview/realview_eb.c arch/arm/mach-realview/realview_pb1176.c +3 more+100 -1101 reply
21/31ARM: amba: realview: get rid of private platform amba_device initializer+0 -02 replies
21/31ARM: amba: realview: get rid of private platform amba_device initializer+0 -01 reply
21/31ARM: amba: realview: get rid of private platform amba_device initializer+0 -01 reply
21/31ARM: amba: realview: get rid of private platform amba_device initializerarch/arm/mach-realview/include/mach/irqs-pb1176.h arch/arm/mach-realview/realview_pb1176.c+2 -20 replies
21/31ARM: amba: realview: get rid of private platform amba_device initializer+0 -01 reply
21/31ARM: amba: realview: get rid of private platform amba_device initializer+0 -00 replies
22/31ARM: amba: integrator: use common amba device initializersarch/arm/mach-integrator/core.c arch/arm/mach-integrator/integrator_cp.c+22 -971 reply
23/31ARM: amba: omap2: use common amba device initializersarch/arm/mach-omap2/emu.c+2 -241 reply
24/31ARM: amba: ep93xx: use common amba device initializersarch/arm/mach-ep93xx/core.c+6 -401 reply
25/31ARM: amba: bcmring: use common amba device initializersarch/arm/mach-bcmring/core.c+2 -210 replies
26/31ARM: amba: netx: use common amba device initializersarch/arm/mach-netx/fb.c+1 -120 replies
27/31ARM: amba: lpc32xx: use common amba device initializersarch/arm/mach-lpc32xx/phy3250.c+4 -280 replies
28/31ARM: amba: u300: use common amba device initializersarch/arm/mach-u300/core.c+16 -691 reply
29/31ARM: amba: nomadik: use common amba device initializersarch/arm/mach-nomadik/board-nhk8815.c arch/arm/mach-nomadik/cpu-8815.c+6 -202 replies
30/31ARM: amba: spear: use common amba device initializersarch/arm/mach-spear3xx/spear300.c arch/arm/mach-spear3xx/spear3xx.c+6 -351 reply
31/31ARM: amba: samsung: use common amba device initializersarch/arm/mach-exynos/dma.c arch/arm/mach-s5p64x0/dma.c arch/arm/mach-s5pc100/dma.c +1 more+23 -1131 reply

Reviews trailers per patch

25 of 38 patches have a Reviewed-by or Acked-by.

PatchViresh KumarShawn GuoRob HerringTony LindgrenH Hartley SweetenAlessandro RubiniKukjin Kimsrinidhi kasagarLinus WalleijWill Deacon
1/31
2/31A-b
3/31A-b A-b
4/31
5/31A-b
5/31A-b
6/31
7/31A-b A-b
8/31
9/31A-b
10/31
11/31
12/31A-b
13/31A-b A-b
14/31
15/31A-b
16/31A-b
17/31
18/31A-b
19/31A-b
20/31T-b
21/31A-b
21/31A-b
21/31A-b
21/31A-b
21/31A-b
21/31A-b
21/31A-b
22/31T-b
23/31A-b
24/31A-b
25/31
26/31
27/31
28/31A-b
29/31A-b A-b
30/31A-b
31/31A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 10 reviewers.

Read the v1 thread

Cover letter [PATCH 00/31] Clean up amba/primecell bus support

This patch set cleans up the AMBA/Primecell bus support. Contained within this set are:

1. Patches 1-5 - Allocation APIs
It seems several places in the kernel want to allocate and register amba_device structures. Let's make this official, and common code. So we introduce amba_device_alloc(), amba_device_add(), and amba_device_put() APIs, which provide the necessary support safely for this.

Convert the DT, ux500, Integrator/AP and mxs code to use these APIs rather than their private version.

2. Patches 6-17 - NO_IRQ cleanup
Making IRQ number 0 mean 'no irq' for the AMBA drivers and bus layer. We get rid of NO_IRQ initializers in this across various platforms, and make the bus layer warn if '-1' is passed in a device as an IRQ. This prevents new occurances of NO_IRQ initializers for this bus type going by unspotted.

3. Patches 18-31 - static initializers
Provide a standardized set of initializers for statically declared AMBA devices. We provide two - one for the simpler APB devices, and one for AHB devices. The major difference between these two is the setting of the DMA mask - APB peripherals do not have DMA capability themselves.

While updating (3), I came across new additions in Spear3xx and the Samsung directories which added AMBA devices, which are declared globally. The Spear3xx devices are used in other files, so that's fine.

Samsung devices don't seem to be - and that needs fixing (did someone not run checkpatch or sparse on these changes?) Please send fixes.

Acks for these patches are welcome.

 arch/arm/mach-bcmring/core.c                   |   23 +-----
 arch/arm/mach-ep93xx/core.c                    |   46 ++---------
 arch/arm/mach-exynos/dma.c                     |   38 ++-------
 arch/arm/mach-integrator/core.c                |   70 +++-------------
 arch/arm/mach-integrator/impd1.c               |    9 +--
 arch/arm/mach-integrator/integrator_cp.c       |   49 ++---------
 arch/arm/mach-lpc32xx/phy3250.c                |   32 +------
 arch/arm/mach-mxs/devices.c                    |    8 +-
 arch/arm/mach-mxs/devices/amba-duart.c         |    2 +-
 arch/arm/mach-netx/fb.c                        |   13 +---
 arch/arm/mach-nomadik/board-nhk8815.c          |   17 +---
 arch/arm/mach-nomadik/cpu-8815.c               |    9 +--
 arch/arm/mach-omap2/emu.c                      |   26 +------
 arch/arm/mach-realview/core.h                  |   20 +----
 arch/arm/mach-realview/realview_eb.c           |   78 +++++++++---------
 arch/arm/mach-realview/realview_pb1176.c       |   78 +++++++++---------
 arch/arm/mach-realview/realview_pb11mp.c       |   78 +++++++++---------
 arch/arm/mach-realview/realview_pba8.c         |   78 +++++++++---------
 arch/arm/mach-realview/realview_pbx.c          |   78 +++++++++---------
 arch/arm/mach-s5p64x0/dma.c                    |   22 +----
 arch/arm/mach-s5pc100/dma.c                    |   38 ++-------
 arch/arm/mach-s5pv210/dma.c                    |   38 ++-------
 arch/arm/mach-spear3xx/spear300.c              |   14 +---
 arch/arm/mach-spear3xx/spear3xx.c              |   27 +-----
 arch/arm/mach-spear6xx/spear6xx.c              |   10 +-
 arch/arm/mach-u300/core.c                      |   85 ++++----------------
 arch/arm/mach-ux500/devices-common.c           |   13 +--
 arch/arm/mach-versatile/core.c                 |   70 ++++++++--------
 arch/arm/mach-versatile/core.h                 |   20 +----
 arch/arm/mach-versatile/versatile_pb.c         |   18 ++--
 arch/arm/mach-vexpress/core.h                  |   17 ----
 arch/arm/mach-vexpress/ct-ca9x4.c              |    8 +-
 arch/arm/mach-vexpress/include/mach/ct-ca9x4.h |    2 +-
 arch/arm/mach-vexpress/v2m.c                   |   20 ++--
 drivers/amba/bus.c                             |  105 ++++++++++++++++++------
 drivers/mmc/host/mmci.c                        |    2 +-
 drivers/of/platform.c                          |    6 +-
 include/linux/amba/bus.h                       |   36 ++++++++
 38 files changed, 488 insertions(+), 815 deletions(-)