Author: imp
Date: Wed Jan 15 19:53:36 2014
New Revision: 260696
URL: http://svnweb.freebsd.org/changeset/base/260696

Log:
  Add data so we can convert a PIO unit number into a base address.

Modified:
  head/sys/arm/at91/at91rm9200.c
  head/sys/arm/at91/at91sam9260.c
  head/sys/arm/at91/at91sam9g20.c
  head/sys/arm/at91/at91sam9g45.c
  head/sys/arm/at91/at91sam9x5.c
  head/sys/arm/at91/at91var.h

Modified: head/sys/arm/at91/at91rm9200.c
==============================================================================
--- head/sys/arm/at91/at91rm9200.c      Wed Jan 15 19:49:12 2014        
(r260695)
+++ head/sys/arm/at91/at91rm9200.c      Wed Jan 15 19:53:36 2014        
(r260696)
@@ -88,6 +88,13 @@ static const int at91_irq_prio[32] =
        0       /* Advanced Interrupt Controller (IRQ6) */
 };
 
+static const uint32_t at91_pio_base[] = {
+       AT91RM92_PIOA_BASE,
+       AT91RM92_PIOB_BASE,
+       AT91RM92_PIOC_BASE,
+       AT91RM92_PIOD_BASE,
+};
+
 #define DEVICE(_name, _id, _unit)              \
        {                                       \
                _name, _unit,                   \
@@ -195,6 +202,8 @@ static struct at91_soc_data soc_data = {
        .soc_clock_init = at91_clock_init,
        .soc_irq_prio = at91_irq_prio,
        .soc_children = at91_devs,
+       .soc_pio_base = at91_pio_base,
+       .soc_pio_count = nitems(at91_pio_base),
 };
 
 AT91_SOC(AT91_T_RM9200, &soc_data);

Modified: head/sys/arm/at91/at91sam9260.c
==============================================================================
--- head/sys/arm/at91/at91sam9260.c     Wed Jan 15 19:49:12 2014        
(r260695)
+++ head/sys/arm/at91/at91sam9260.c     Wed Jan 15 19:53:36 2014        
(r260696)
@@ -87,6 +87,12 @@ static const int at91_irq_prio[32] =
        0,      /* Advanced Interrupt Controller IRQ2 */
 };
 
+static const uint32_t at91_pio_base[] = {
+       AT91SAM9260_PIOA_BASE,
+       AT91SAM9260_PIOB_BASE,
+       AT91SAM9260_PIOC_BASE,
+};
+
 #define        DEVICE(_name, _id, _unit)               \
        {                                       \
                _name, _unit,                   \
@@ -204,6 +210,8 @@ static struct at91_soc_data soc_data = {
        .soc_clock_init = at91_clock_init,
        .soc_irq_prio = at91_irq_prio,
        .soc_children = at91_devs,
+       .soc_pio_base = at91_pio_base,
+       .soc_pio_count = nitems(at91_pio_base),
 };
 
 AT91_SOC(AT91_T_SAM9260, &soc_data);

Modified: head/sys/arm/at91/at91sam9g20.c
==============================================================================
--- head/sys/arm/at91/at91sam9g20.c     Wed Jan 15 19:49:12 2014        
(r260695)
+++ head/sys/arm/at91/at91sam9g20.c     Wed Jan 15 19:53:36 2014        
(r260696)
@@ -87,6 +87,12 @@ static const int at91_irq_prio[32] =
        0,      /* Advanced Interrupt Controller IRQ2 */
 };
 
+static const uint32_t at91_pio_base[] = {
+       AT91SAM9G20_PIOA_BASE,
+       AT91SAM9G20_PIOB_BASE,
+       AT91SAM9G20_PIOC_BASE,
+};
+
 #define DEVICE(_name, _id, _unit)              \
        {                                       \
                _name, _unit,                   \
@@ -169,6 +175,8 @@ static struct at91_soc_data soc_data = {
        .soc_clock_init = at91_clock_init,
        .soc_irq_prio = at91_irq_prio,
        .soc_children = at91_devs,
+       .soc_pio_base = at91_pio_base,
+       .soc_pio_count = nitems(at91_pio_base),
 };
 
 AT91_SOC(AT91_T_SAM9G20, &soc_data);

Modified: head/sys/arm/at91/at91sam9g45.c
==============================================================================
--- head/sys/arm/at91/at91sam9g45.c     Wed Jan 15 19:49:12 2014        
(r260695)
+++ head/sys/arm/at91/at91sam9g45.c     Wed Jan 15 19:53:36 2014        
(r260696)
@@ -88,6 +88,14 @@ static const int at91_irq_prio[32] =
        0,      /* Advanced Interrupt Controller IRQ0 */
 };
 
+static const uint32_t at91_pio_base[] = {
+       AT91SAM9G45_PIOA_BASE,
+       AT91SAM9G45_PIOB_BASE,
+       AT91SAM9G45_PIOC_BASE,
+       AT91SAM9G45_PIOD_BASE,
+       AT91SAM9G45_PIOE_BASE,
+};
+
 #define DEVICE(_name, _id, _unit)              \
        {                                       \
                _name, _unit,                   \
@@ -155,6 +163,8 @@ static struct at91_soc_data soc_data = {
        .soc_clock_init = at91_clock_init,
        .soc_irq_prio = at91_irq_prio,
        .soc_children = at91_devs,
+       .soc_pio_base = at91_pio_base,
+       .soc_pio_count = nitems(at91_pio_base),
 };
 
 AT91_SOC(AT91_T_SAM9G45, &soc_data);

Modified: head/sys/arm/at91/at91sam9x5.c
==============================================================================
--- head/sys/arm/at91/at91sam9x5.c      Wed Jan 15 19:49:12 2014        
(r260695)
+++ head/sys/arm/at91/at91sam9x5.c      Wed Jan 15 19:53:36 2014        
(r260696)
@@ -87,6 +87,13 @@ static const int at91_irq_prio[32] =
        0,      /* Advanced Interrupt Controller (IRQ0) */
 };
 
+static const uint32_t at91_pio_base[] = {
+       AT91SAM9X25_PIOA_BASE,
+       AT91SAM9X25_PIOB_BASE,
+       AT91SAM9X25_PIOC_BASE,
+       AT91SAM9X25_PIOD_BASE,
+};
+
 #define DEVICE(_name, _id, _unit)              \
        {                                       \
                _name, _unit,                   \
@@ -172,6 +179,8 @@ static struct at91_soc_data soc_data = {
        .soc_clock_init = at91_clock_init,
        .soc_irq_prio = at91_irq_prio,
        .soc_children = at91_devs,
+       .soc_pio_base = at91_pio_base,
+       .soc_pio_count = nitems(at91_pio_base),
 };
 
 AT91_SOC_SUB(AT91_T_SAM9X5, AT91_ST_SAM9X25, &soc_data);

Modified: head/sys/arm/at91/at91var.h
==============================================================================
--- head/sys/arm/at91/at91var.h Wed Jan 15 19:49:12 2014        (r260695)
+++ head/sys/arm/at91/at91var.h Wed Jan 15 19:53:36 2014        (r260696)
@@ -107,11 +107,13 @@ typedef void (*cpu_reset_t)(void);
 typedef void (*clk_init_t)(void);
 
 struct at91_soc_data {
-       DELAY_t         soc_delay;
-       cpu_reset_t     soc_reset;
-       clk_init_t      soc_clock_init;
-       const int       *soc_irq_prio;
-       const struct cpu_devs *soc_children;
+       DELAY_t         soc_delay;              /* SoC specific delay function 
*/
+       cpu_reset_t     soc_reset;              /* SoC specific reset function 
*/
+       clk_init_t      soc_clock_init;         /* SoC specific clock init 
function */
+       const int       *soc_irq_prio;          /* SoC specific IRQ priorities 
*/
+       const struct cpu_devs *soc_children;    /* SoC specific children list */
+       const uint32_t  *soc_pio_base;          /* SoC specific PIO base 
registers */
+       size_t          soc_pio_count;          /* Count of PIO units (not 
pins) in SoC */
 };
 
 struct at91_soc_info {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to