All of lore.kernel.org
 help / color / mirror / Atom feed
From: ryan@bluewatersys.com (Ryan Mallon)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 00/23] at91: Replace duplicate device initialisation code with common code
Date: Wed, 20 Apr 2011 15:58:33 +1200	[thread overview]
Message-ID: <4DAE59E9.5030808@bluewatersys.com> (raw)
In-Reply-To: <20110420034708.GD4204@game.jcrosoft.org>

On 04/20/2011 03:47 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Hi,
> 
> 	I work olso on the same ideayou send first good
> 
> 	will take a look on it this week-end and test it

Thanks, that would be really helpful.

Hartley pointed out that there are a couple of mistakes in the patch
series (some bits get applied in the wrong patch, which I will fix), but
if you apply the whole series it should work correctly.

Thanks,
~Ryan

> Best Regards,
> J.
> On 13:10 Wed 20 Apr     , Ryan Mallon wrote:
>> Each AT91 variant (AT91RM9200, AT91SAM9260, etc) currently has its own
>> devices file, which includes the MMIO address, interrupt
>> configuration, GPIO setup, etc for each device. This results in a large
>> amount of duplicated code.
>>
>> This patch set introduces a framework for adding shared devices for the
>> AT91 platform and replaces the multiple device setup implementations for
>> each device with single implementations in the new framework. This has
>> a net reduction of nearly 5000 lines of code.
>>
>> Each of the arch/arm/mach-at91/*_devices.c files becomes a collection of
>> structures (with some initialisation callbacks where necessary) with a
>> table of devices which are present on the particular AT91 variant. All
>> structures/functions are marked as __init/__initdata so there is little
>> additional memory overhead. This also means that the #ifdefs around each
>> device can be removed from the *_devices.c files (but remain in the new
>> common devices.c file) without overhead.
>>
>> I have build tested the patch series for all of the  AT91 variants 
>> and devices, and have boot tested it on the AT91SAM9260 (Snapper 9260
>> board) and tested basic device functionality.
>>
>> Ryan Mallon (23):
>>   at91: Add common devices framework
>>   at91: Make Ethernet device common
>>   at91: Make USB OHCI/EHCI devices common
>>   at91: Make UDC device common
>>   at91: Make MMC device common
>>   at91: Make NAND device common
>>   at91: Make TWI device common
>>   at91: Make SPI device common
>>   at91: Make TCB device common
>>   at91: Make RTT device common
>>   at91: Make watchdog device common
>>   at91: Make UART devices common
>>   at91: Make PWM device common
>>   at91: Make SSC device common
>>   at91: Make AC97 device common
>>   at91: Make LCD controller device common
>>   at91: Make touchscreen device common
>>   at91: Make HDMAC device common
>>   at91: Make RTC device common
>>   at91: Make high speed USB gadget device common
>>   at91: Make compact flash device common
>>   at91: Move at91sam9263 CAN device to common devices
>>   at91: Remove mAgic and ISI device code
>>
>>  arch/arm/mach-at91/Makefile               |    2 +-
>>  arch/arm/mach-at91/at572d940hf.c          |    4 +
>>  arch/arm/mach-at91/at572d940hf_devices.c  | 1022 +++-------------
>>  arch/arm/mach-at91/at91cap9.c             |    4 +
>>  arch/arm/mach-at91/at91cap9_devices.c     | 1411 ++++----------------
>>  arch/arm/mach-at91/at91rm9200.c           |    4 +
>>  arch/arm/mach-at91/at91rm9200_devices.c   | 1321 ++++---------------
>>  arch/arm/mach-at91/at91sam9260.c          |    4 +
>>  arch/arm/mach-at91/at91sam9260_devices.c  | 1471 ++++-----------------
>>  arch/arm/mach-at91/at91sam9261.c          |    4 +
>>  arch/arm/mach-at91/at91sam9261_devices.c  | 1172 ++++--------------
>>  arch/arm/mach-at91/at91sam9263.c          |    4 +
>>  arch/arm/mach-at91/at91sam9263_devices.c  | 1589 +++++------------------
>>  arch/arm/mach-at91/at91sam9g45.c          |    4 +
>>  arch/arm/mach-at91/at91sam9g45_devices.c  | 1779 +++++---------------------
>>  arch/arm/mach-at91/at91sam9rl.c           |    4 +
>>  arch/arm/mach-at91/at91sam9rl_devices.c   | 1332 ++++----------------
>>  arch/arm/mach-at91/board-1arm.c           |    6 +-
>>  arch/arm/mach-at91/board-afeb-9260v1.c    |   10 +-
>>  arch/arm/mach-at91/board-at572d940hf_ek.c |   12 +-
>>  arch/arm/mach-at91/board-cam60.c          |    2 +-
>>  arch/arm/mach-at91/board-cap9adk.c        |    4 +-
>>  arch/arm/mach-at91/board-carmeva.c        |    6 +-
>>  arch/arm/mach-at91/board-cpu9krea.c       |   16 +-
>>  arch/arm/mach-at91/board-cpuat91.c        |   12 +-
>>  arch/arm/mach-at91/board-csb337.c         |    4 +-
>>  arch/arm/mach-at91/board-csb637.c         |    4 +-
>>  arch/arm/mach-at91/board-eb9200.c         |    8 +-
>>  arch/arm/mach-at91/board-ecbat91.c        |    6 +-
>>  arch/arm/mach-at91/board-eco920.c         |    2 +-
>>  arch/arm/mach-at91/board-flexibity.c      |    2 +-
>>  arch/arm/mach-at91/board-foxg20.c         |   16 +-
>>  arch/arm/mach-at91/board-gsia18s.c        |   14 +-
>>  arch/arm/mach-at91/board-kafa.c           |    6 +-
>>  arch/arm/mach-at91/board-kb9202.c         |   10 +-
>>  arch/arm/mach-at91/board-neocore926.c     |    6 +-
>>  arch/arm/mach-at91/board-pcontrol-g20.c   |   10 +-
>>  arch/arm/mach-at91/board-picotux200.c     |    6 +-
>>  arch/arm/mach-at91/board-qil-a9260.c      |   10 +-
>>  arch/arm/mach-at91/board-rm9200dk.c       |    6 +-
>>  arch/arm/mach-at91/board-rm9200ek.c       |    6 +-
>>  arch/arm/mach-at91/board-sam9-l9260.c     |    8 +-
>>  arch/arm/mach-at91/board-sam9260ek.c      |   10 +-
>>  arch/arm/mach-at91/board-sam9261ek.c      |    6 +-
>>  arch/arm/mach-at91/board-sam9263ek.c      |    6 +-
>>  arch/arm/mach-at91/board-sam9g20ek.c      |   10 +-
>>  arch/arm/mach-at91/board-sam9m10g45ek.c   |    2 +-
>>  arch/arm/mach-at91/board-sam9rlek.c       |    4 +-
>>  arch/arm/mach-at91/board-snapper9260.c    |   14 +-
>>  arch/arm/mach-at91/board-stamp9g20.c      |   20 +-
>>  arch/arm/mach-at91/board-usb-a9260.c      |    4 +-
>>  arch/arm/mach-at91/board-usb-a9263.c      |    4 +-
>>  arch/arm/mach-at91/board-yl-9200.c        |   10 +-
>>  arch/arm/mach-at91/devices.c              | 2002 +++++++++++++++++++++++++++++
>>  arch/arm/mach-at91/devices.h              |  237 ++++
>>  arch/arm/mach-at91/include/mach/board.h   |   21 +-
>>  56 files changed, 4483 insertions(+), 9190 deletions(-)
>>  create mode 100644 arch/arm/mach-at91/devices.c
>>  create mode 100644 arch/arm/mach-at91/devices.h


-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan at bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934

  reply	other threads:[~2011-04-20  3:58 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20  1:10 [RFC PATCH 00/23] at91: Replace duplicate device initialisation code with common code Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 01/23] at91: Add common devices framework Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 02/23] at91: Make Ethernet device common Ryan Mallon
2011-04-20  2:10   ` H Hartley Sweeten
2011-04-20  2:33     ` Ryan Mallon
2011-04-20 18:23       ` H Hartley Sweeten
2011-04-20  8:36   ` Uwe Kleine-König
2011-04-20 10:34     ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-20 11:07     ` Ryan Mallon
2011-04-20 20:41     ` Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 03/23] at91: Make USB OHCI/EHCI devices common Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 04/23] at91: Make UDC device common Ryan Mallon
2011-04-20  1:10 ` [PATCH 05/23] at91: Make MMC device (at91_mci) common Ryan Mallon
2011-04-20  1:12   ` Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 05/23] at91: Make MMC device common Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 06/23] at91: Make NAND " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 07/23] at91: Make TWI " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 08/23] at91: Make SPI " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 09/23] at91: Make TCB " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 10/23] at91: Make RTT " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 11/23] at91: Make watchdog " Ryan Mallon
2011-04-20 17:10   ` H Hartley Sweeten
2011-04-20  1:10 ` [RFC PATCH 13/23] at91: Make PWM " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 14/23] at91: Make SSC " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 15/23] at91: Make AC97 " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 16/23] at91: Make LCD controller " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 17/23] at91: Make touchscreen " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 18/23] at91: Make HDMAC " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 19/23] at91: Make RTC " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 20/23] at91: Make high speed USB gadget " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 21/23] at91: Make compact flash " Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 22/23] at91: Move at91sam9263 CAN device to common devices Ryan Mallon
2011-04-20  1:10 ` [RFC PATCH 23/23] at91: Remove mAgic and ISI device code Ryan Mallon
2011-04-20  1:11 ` [RFC PATCH 12/23] at91: Make UART devices common Ryan Mallon
2011-04-20  3:47 ` [RFC PATCH 00/23] at91: Replace duplicate device initialisation code with common code Jean-Christophe PLAGNIOL-VILLARD
2011-04-20  3:58   ` Ryan Mallon [this message]
2011-04-20  4:03     ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-20 17:14 ` H Hartley Sweeten
2011-04-20 21:07   ` Ryan Mallon
2011-04-21  0:56     ` Detlef Vollmann
2011-04-21  1:04       ` Ryan Mallon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DAE59E9.5030808@bluewatersys.com \
    --to=ryan@bluewatersys.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.