From: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: Boris Brezillon
<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Jean-Christophe Plagniol-Villard
<plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>,
Alexandre Belloni
<alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Andrew Victor <linux-PelNFVqkFnVyf+4FbqDuWQ@public.gmane.org>,
Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Jean-Jacques Hiblot
<jjhiblot-dLKeG7h1OhBDOHtkgc7UlQ@public.gmane.org>
Subject: Re: [PATCH v3 01/11] mfd: syscon: Add atmel-matrix registers definition
Date: Wed, 3 Dec 2014 16:57:51 +0100 [thread overview]
Message-ID: <547F32FF.7000005@atmel.com> (raw)
In-Reply-To: <1417429647-3419-2-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Le 01/12/2014 11:27, Boris Brezillon a écrit :
> AT91 SoCs have a memory range reserved for internal bus configuration.
> Expose those registers so that drivers can make use of the matrix syscon
> declared in at91 DTs.
>
> Signed-off-by: Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Acked-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> include/linux/mfd/syscon/atmel-matrix.h | 114 ++++++++++++++++++++++++++++++++
> 1 file changed, 114 insertions(+)
> create mode 100644 include/linux/mfd/syscon/atmel-matrix.h
>
> diff --git a/include/linux/mfd/syscon/atmel-matrix.h b/include/linux/mfd/syscon/atmel-matrix.h
> new file mode 100644
> index 0000000..d0da495
> --- /dev/null
> +++ b/include/linux/mfd/syscon/atmel-matrix.h
> @@ -0,0 +1,114 @@
> +/*
> + * Copyright (C) 2014 Atmel Corporation.
> + *
> + * Memory Controllers (MATRIX, EBI) - System peripherals registers.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#ifndef _LINUX_MFD_SYSCON_ATMEL_MATRIX_H
> +#define _LINUX_MFD_SYSCON_ATMEL_MATRIX_H
> +
> +#define AT91SAM9260_MATRIX_MCFG_OFF 0x00
> +#define AT91SAM9260_MATRIX_SCFG_OFF 0x40
> +#define AT91SAM9260_MATRIX_PRS_OFF 0x80
> +#define AT91SAM9260_MATRIX_MRCR_OFF 0x100
> +#define AT91SAM9260_MATRIX_EBICSA_OFF 0x11c
> +
> +#define AT91SAM9261_MATRIX_MRCR_OFF 0x0
> +#define AT91SAM9261_MATRIX_SCFG_OFF 0x4
> +#define AT91SAM9261_MATRIX_TCR_OFF 0x24
> +#define AT91SAM9261_MATRIX_EBICSA_OFF 0x30
> +#define AT91SAM9261_MATRIX_USBPUCR_OFF 0x34
> +
> +#define AT91SAM9263_MATRIX_MCFG_OFF 0x00
> +#define AT91SAM9263_MATRIX_SCFG_OFF 0x40
> +#define AT91SAM9263_MATRIX_PRS_OFF 0x80
> +#define AT91SAM9263_MATRIX_MRCR_OFF 0x100
> +#define AT91SAM9263_MATRIX_TCR_OFF 0x114
> +#define AT91SAM9263_MATRIX_EBI0CSA_OFF 0x120
> +#define AT91SAM9263_MATRIX_EBI1CSA_OFF 0x124
> +
> +#define AT91SAM9G45_MATRIX_MCFG_OFF 0x00
> +#define AT91SAM9G45_MATRIX_SCFG_OFF 0x40
> +#define AT91SAM9G45_MATRIX_PRS_OFF 0x80
> +#define AT91SAM9G45_MATRIX_MRCR_OFF 0x100
> +#define AT91SAM9G45_MATRIX_TCR_OFF 0x110
> +#define AT91SAM9G45_MATRIX_DDRMPR_OFF 0x118
> +#define AT91SAM9G45_MATRIX_EBICSA_OFF 0x128
> +
> +#define AT91SAM9N12_MATRIX_MCFG_OFF 0x00
> +#define AT91SAM9N12_MATRIX_SCFG_OFF 0x40
> +#define AT91SAM9N12_MATRIX_PRS_OFF 0x80
> +#define AT91SAM9N12_MATRIX_MRCR_OFF 0x100
> +#define AT91SAM9N12_MATRIX_EBICSA_OFF 0x118
> +
> +#define AT91SAM9X5_MATRIX_MCFG_OFF 0x00
> +#define AT91SAM9X5_MATRIX_SCFG_OFF 0x40
> +#define AT91SAM9X5_MATRIX_PRS_OFF 0x80
> +#define AT91SAM9X5_MATRIX_MRCR_OFF 0x100
> +#define AT91SAM9X5_MATRIX_EBICSA_OFF 0x120
> +
> +#define SAMA5D3_MATRIX_MCFG_OFF 0x00
> +#define SAMA5D3_MATRIX_SCFG_OFF 0x40
> +#define SAMA5D3_MATRIX_PRS_OFF 0x80
> +#define SAMA5D3_MATRIX_MRCR_OFF 0x100
> +
> +#define AT91_MATRIX_MCFG(o, x) ((o) + ((x) * 0x4))
> +#define AT91_MATRIX_ULBT (7 << 0)
> +#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
> +#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
> +#define AT91_MATRIX_ULBT_FOUR (2 << 0)
> +#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
> +#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
> +
> +#define AT91_MATRIX_SCFG(o, x) ((o) + ((x) * 0x4))
> +#define AT91_MATRIX_SLOT_CYCLE (0xff << 0)
> +#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16)
> +#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
> +#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
> +#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
> +#define AT91_MATRIX_FIXED_DEFMSTR (7 << 18)
> +#define AT91_MATRIX_ARBT (3 << 24)
> +#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
> +#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
> +
> +#define AT91_MATRIX_TCR(o) (o)
> +#define AT91_MATRIX_ITCM_SIZE (0xf << 0)
> +#define AT91_MATRIX_ITCM_0 (0 << 0)
> +#define AT91_MATRIX_ITCM_16 (5 << 0)
> +#define AT91_MATRIX_ITCM_32 (6 << 0)
> +#define AT91_MATRIX_ITCM_64 (7 << 0)
> +#define AT91_MATRIX_DTCM_SIZE (0xf << 4)
> +#define AT91_MATRIX_DTCM_0 (0 << 4)
> +#define AT91_MATRIX_DTCM_16 (5 << 4)
> +#define AT91_MATRIX_DTCM_32 (6 << 4)
> +#define AT91_MATRIX_DTCM_64 (7 << 4)
> +
> +#define AT91_MATRIX_PRAS(o, x) ((o) + ((x) * 0x8))
> +#define AT91_MATRIX_PRBS(o, x) ((o) + ((x) * 0x8) + 0x4)
> +#define AT91_MATRIX_MPR_MSK(x) (3 << ((x) * 0x4))
> +
> +#define AT91_MATRIX_MRC(o) (o)
> +#define AT91_MATRIX_RCB(x) BIT(x)
> +
> +#define AT91_MATRIX_EBICSA(o) (o)
> +#define AT91_MATRIX_CSA(cs, val) (val << (cs))
> +#define AT91_MATRIX_DBPUC BIT(8)
> +#define AT91_MATRIX_DBPDC BIT(9)
> +#define AT91_MATRIX_VDDIOMSEL BIT(16)
> +#define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16)
> +#define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16)
> +#define AT91_MATRIX_EBI_IOSR BIT(17)
> +#define AT91_MATRIX_DDR_IOSR BIT(18)
> +#define AT91_MATRIX_NFD0_SELECT BIT(24)
> +#define AT91_MATRIX_DDR_MP_EN BIT(25)
> +#define AT91_MATRIX_EBI_NUM_CS 8
> +
> +#define AT91_MATRIX_WPMR(o) (o)
> +#define AT91_MATRIX_WPSR(o) (o)
> +
> +#endif /* _LINUX_MFD_SYSCON_ATMEL_MATRIX_H */
>
General comment on the register descriptions of this series:
please be consistent:
1/ use BIT(x) marco *or* (1 << 16) not both
2/ use GENMASK(x,y) macro *or* (3 << 16) not both
3/ SAMA5D3_MATRIX_SCFG_OFF <== what is the meaning of _OFF offset of the
register? if it's not used in a macro (and a macro is not desirable),
please remove this suffix.
4/ same for the suffix _OFFSET in the SMC register definition file
5/ same for the _SHFT suffix in SMC register definition file
6/ what is the purpose of these macros? #defineAT91_MATRIX_WPMR(o) (o)
Thanks, bye.
--
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-12-03 15:57 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 10:27 [PATCH v3 00/11] memory: add Atmel EBI (External Bus Interface) driver Boris Brezillon
2014-12-01 10:27 ` [PATCH v3 01/11] mfd: syscon: Add atmel-matrix registers definition Boris Brezillon
[not found] ` <1417429647-3419-2-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-12-03 15:57 ` Nicolas Ferre [this message]
2014-12-01 10:27 ` [PATCH v3 02/11] mfd: syscon: Add Atmel Matrix bus DT binding documentation Boris Brezillon
[not found] ` <1417429647-3419-3-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-12-03 14:32 ` Nicolas Ferre
[not found] ` <547F1F11.5090803-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2014-12-03 14:52 ` Boris Brezillon
2014-12-01 10:27 ` [PATCH v3 03/11] mfd: syscon: Add atmel-smc registers definition Boris Brezillon
2014-12-01 10:27 ` [PATCH v3 04/11] mfd: syscon: Add Atmel SMC binding doc Boris Brezillon
2014-12-01 10:27 ` [PATCH v3 05/11] memory: add Atmel EBI (External Bus Interface) driver Boris Brezillon
[not found] ` <1417429647-3419-6-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-12-01 10:40 ` Alexander Stein
2014-12-01 10:50 ` Boris Brezillon
2014-12-01 16:17 ` Arnd Bergmann
2014-12-02 9:18 ` Alexander Stein
2014-12-02 9:41 ` Arnd Bergmann
2014-12-01 16:26 ` Arnd Bergmann
2014-12-01 18:29 ` Boris Brezillon
2014-12-01 19:43 ` Arnd Bergmann
2014-12-01 20:28 ` Boris Brezillon
2014-12-01 21:28 ` Arnd Bergmann
2014-12-09 20:53 ` Alexander Stein
2014-12-15 10:22 ` Boris Brezillon
2014-12-15 10:29 ` Alexander Stein
2014-12-15 10:43 ` Boris Brezillon
2014-12-01 10:27 ` [PATCH v3 06/11] memory: atmel-ebi: add DT bindings documentation Boris Brezillon
[not found] ` <1417429647-3419-7-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-12-03 14:56 ` Nicolas Ferre
[not found] ` <547F24B6.8070504-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2014-12-03 15:15 ` Nicolas Ferre
[not found] ` <547F2918.3070803-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2014-12-03 15:34 ` Boris Brezillon
2014-12-03 15:38 ` Boris Brezillon
2014-12-03 19:28 ` Boris Brezillon
2014-12-01 10:27 ` [PATCH v3 07/11] ARM: at91: select ATMEL_EBI when compiling a kernel for at91sam9 or sama5d3 Boris Brezillon
2014-12-03 16:21 ` Nicolas Ferre
2014-12-01 10:27 ` [PATCH v3 08/11] ARM: at91/dt: add HSMC (Static Memory Controller) node in sama5d3 dtsi Boris Brezillon
2014-12-01 10:27 ` [PATCH v3 09/11] ARM: at91/dt: add matrix " Boris Brezillon
2014-12-01 10:27 ` [PATCH v3 10/11] ARM: at91/dt: add EBI (External Bus Interface) " Boris Brezillon
2014-12-01 10:27 ` [PATCH v3 11/11] ARM: at91/dt: add NOR definition in sama5d3xcm dtsi Boris Brezillon
[not found] ` <1417429647-3419-1-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-12-02 8:47 ` [PATCH v4 05/11] memory: add Atmel EBI (External Bus Interface) driver Boris Brezillon
[not found] ` <1417510037-1060-1-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-12-03 15:24 ` Nicolas Ferre
2014-12-03 11:14 ` [PATCH v4 01/11] mfd: syscon: Add atmel-matrix registers definition Boris Brezillon
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=547F32FF.7000005@atmel.com \
--to=nicolas.ferre-aife0yeh4naavxtiumwx3w@public.gmane.org \
--cc=alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=jjhiblot-dLKeG7h1OhBDOHtkgc7UlQ@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-PelNFVqkFnVyf+4FbqDuWQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).