From owner-svn-src-all@FreeBSD.ORG Wed Jan 15 19:53:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 052518AC; Wed, 15 Jan 2014 19:53:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D96DE1FD7; Wed, 15 Jan 2014 19:53:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0FJrbb3097534; Wed, 15 Jan 2014 19:53:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0FJraal097526; Wed, 15 Jan 2014 19:53:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201401151953.s0FJraal097526@svn.freebsd.org> From: Warner Losh Date: Wed, 15 Jan 2014 19:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260696 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jan 2014 19:53:38 -0000 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 {