From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/9] SPEAr13xx: Add header files
Date: Fri, 20 Apr 2012 17:52:05 +0000 [thread overview]
Message-ID: <201204201752.05657.arnd@arndb.de> (raw)
In-Reply-To: <7c9115d4111ddc27f9088e668dbca409bebc9e70.1334942163.git.viresh.kumar@st.com>
On Friday 20 April 2012, Viresh Kumar wrote:
> diff --git a/arch/arm/mach-spear13xx/include/mach/dma.h b/arch/arm/mach-spear13xx/include/mach/dma.h
> new file mode 100644
> index 0000000..383ab04
> --- /dev/null
> +++ b/arch/arm/mach-spear13xx/include/mach/dma.h
> @@ -0,0 +1,128 @@
> +#ifndef __MACH_DMA_H
> +#define __MACH_DMA_H
> +
> +/* request id of all the peripherals */
> +enum dma_master_info {
> + /* Accessible from only one master */
> + DMA_MASTER_MCIF = 0,
> + DMA_MASTER_FSMC = 1,
> + /* Accessible from both 0 & 1 */
> + DMA_MASTER_MEMORY = 0,
> + DMA_MASTER_ADC = 0,
> + DMA_MASTER_UART0 = 0,
> + DMA_MASTER_SSP0 = 0,
> + DMA_MASTER_I2C0 = 0,
Ideally we wouldn't have this file and put all the data into
the device tree of course but we're still lacking bindings for
that, so it's still ok for v3.5.
> diff --git a/arch/arm/mach-spear13xx/include/mach/irqs.h b/arch/arm/mach-spear13xx/include/mach/irqs.h
> new file mode 100644
> index 0000000..ddf5721
> --- /dev/null
> +++ b/arch/arm/mach-spear13xx/include/mach/irqs.h
> @@ -0,0 +1,23 @@
> +
> +#ifndef __MACH_IRQS_H
> +#define __MACH_IRQS_H
> +
> +#define IRQ_LOCALTIMER 29
I think we can now probe localtimer from devicetree so you should
not need this one any more.
> +#define SPEAR13XX_IRQ_GPT0_TMR0 69
> +#define SPEAR13XX_IRQ_GPT0_TMR1 70
I'd also prefer if you could add bindings for GPT and probe
these interrupts and the GPT address from the devicetree
for the three spear platforms, that would make the code much
nicer in this area.
> +#define PERIP_GRP2_BASE UL(0xB3000000)
> +#define VA_PERIP_GRP2_BASE UL(0xFE000000)
> +#define MCIF_SDHCI_BASE UL(0xB3000000)
> +#define SYSRAM0_BASE UL(0xB3800000)
> +#define VA_SYSRAM0_BASE UL(0xFE800000)
> +#define SYS_LOCATION (VA_SYSRAM0_BASE + 0x600)
> +
> +#define PERIP_GRP1_BASE UL(0xE0000000)
> +#define VA_PERIP_GRP1_BASE UL(0xFD000000)
> +#define UART_BASE UL(0xE0000000)
> +#define VA_UART_BASE UL(0xFD000000)
> +#define ADC_BASE UL(0xE0080000)
> +#define SSP_BASE UL(0xE0100000)
> +#define I2C_BASE UL(0xE0280000)
> +#define KBD_BASE UL(0xE0300000)
> +#define GPT0_BASE UL(0xE0380000)
> +#define GPIO0_BASE UL(0xE0600000)
> +#define GPIO1_BASE UL(0xE0680000)
> +#define MISC_BASE UL(0xE0700000)
> +#define VA_MISC_BASE IOMEM(UL(0xFD700000))
> +#define SYSRAM1_BASE UL(0xE0800000)
> +
> +#define A9SM_AND_MPMC_BASE UL(0xEC000000)
> +#define VA_A9SM_AND_MPMC_BASE UL(0xFC000000)
> +
> +/* A9SM peripheral offsets */
> +#define A9SM_PERIP_BASE UL(0xEC800000)
> +#define VA_A9SM_PERIP_BASE UL(0xFC800000)
> +#define VA_SCU_BASE (VA_A9SM_PERIP_BASE + 0x00)
> +#define GIC_CPU_BASE (A9SM_PERIP_BASE + 0x100)
> +#define GLOBAL_TMR_BASE (A9SM_PERIP_BASE + 0x200)
> +#define LOCAL_TMR_BASE (A9SM_PERIP_BASE + 0x600)
> +#define GIC_DIST_BASE (A9SM_PERIP_BASE + 0x1000)
> +
> +#define L2CC_BASE UL(0xED000000)
> +#define VA_L2CC_BASE IOMEM(UL(0xFB000000))
> +
> +/* others */
> +#define GETH_BASE UL(0xE2000000)
> +#define DMAC0_BASE UL(0xEA800000)
> +#define DMAC1_BASE UL(0xEB000000)
> +#define MCIF_CF_BASE UL(0xB2800000)
> +
> +/* Devices present in SPEAr1310 */
> +#ifdef CONFIG_MACH_SPEAR1310
> +#define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000)
> +#define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000)
> +#define SPEAR1310_RAS_BASE UL(0xD8400000)
> +#define VA_SPEAR1310_RAS_BASE IOMEM(UL(0xFA400000))
Can you go through this list one more time and check which ones are
still needed here? I think most of them can just get removed.
> +/* RAS Area Control Register */
> +#define SPEAR1310_RAS_CTRL_REG0 (VA_SPEAR1310_RAS_BASE + 0x000)
> + #define SPEAR1310_GPT64_SYNC_ENB 0
> + #define SPEAR1310_GPT64_SYNC_ENB_MASK 1
> + #define SPEAR1310_GPT64_SYNC_ENB_SHIFT 31
> + #define SPEAR1310_SSP1_CS_SEL_CS0 0
> + #define SPEAR1310_SSP1_CS_SEL_CS1 1
> + #define SPEAR1310_SSP1_CS_SEL_MASK 3
> + #define SPEAR1310_SSP1_CS_SEL_SHIFT 30
> + #define SPEAR1310_SSP1_CS_VAL_MASK 1
> + #define SPEAR1310_SSP1_CS_VAL_SHIFT 28
> + #define SPEAR1310_SSP1_CS_CTL_HW 0
> + #define SPEAR1310_SSP1_CS_CTL_SW 1
Why are the RAS control registers in a global header? It looks like you
only use them from the clock driver, so they can be moved into a local
header file there.
Arnd
next prev parent reply other threads:[~2012-04-20 17:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 17:22 [PATCH 0/9] Add support for SPEAr13xx SoCs Viresh Kumar
2012-04-20 17:22 ` [PATCH 1/9] SPEAr13xx: Add header files Viresh Kumar
2012-04-20 17:52 ` Arnd Bergmann [this message]
2012-04-21 12:27 ` viresh kumar
2012-04-21 18:37 ` Arnd Bergmann
2012-04-23 11:47 ` viresh kumar
2012-04-23 12:25 ` viresh kumar
2012-04-20 17:22 ` [PATCH 2/9] SPEAr13xx: Add source files Viresh Kumar
2012-04-20 18:15 ` Arnd Bergmann
2012-04-21 12:23 ` viresh kumar
2012-04-21 18:31 ` Arnd Bergmann
2012-04-20 17:22 ` [PATCH 3/9] SPEAr13xx: Add common clock framework support Viresh Kumar
2012-04-23 21:43 ` Turquette, Mike
2012-04-24 3:57 ` Viresh Kumar
2012-04-20 17:22 ` [PATCH 4/9] pinctrl: SPEAr: Create macro for declaring GPIO PINS Viresh Kumar
2012-04-20 17:22 ` [PATCH 6/9] SPEAr13xx: Add dts and dtsi files Viresh Kumar
2012-04-20 17:22 ` [PATCH 7/9] SPEAr13xx: Add compilation support Viresh Kumar
2012-04-20 17:22 ` [PATCH 8/9] SPEAr13xx: Add defconfig Viresh Kumar
2012-04-20 17:22 ` [PATCH 9/9] SPEAr: Update MAINTAINERS and Documentation Viresh Kumar
2012-04-20 18:21 ` [PATCH 0/9] Add support for SPEAr13xx SoCs Arnd Bergmann
2012-04-21 12:17 ` viresh kumar
2012-04-21 12:24 ` Arnd Bergmann
2012-04-21 12:29 ` viresh kumar
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=201204201752.05657.arnd@arndb.de \
--to=arnd@arndb.de \
--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.