From: r.sricharan@ti•com (Sricharan R)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2 1/8] ARM: DRA7: id: Add cpu detection support for DRA7xx based SoCs'
Date: Tue, 30 Jul 2013 19:48:23 +0530 [thread overview]
Message-ID: <51F7CB2F.6070705@ti.com> (raw)
In-Reply-To: <20130730131009.GA28162@radagast>
On Tuesday 30 July 2013 06:40 PM, Felipe Balbi wrote:
> Hi,
>
> On Tue, Jul 30, 2013 at 04:55:39PM +0530, Rajendra Nayak wrote:
>> @@ -379,6 +407,13 @@ IS_OMAP_TYPE(3430, 0x3430)
>> # define soc_is_omap543x() is_omap543x()
>> #endif
>>
>> +# if defined(CONFIG_SOC_DRA7XX)
>> +# undef soc_is_dra7xx
>> +# undef soc_is_dra75x
>> +# define soc_is_dra7xx() is_dra7xx()
>> +# define soc_is_dra75x() is_dra75x()
> since this platform is DT-only, couldn't we just believe DT-data to be
> correct of_machine_is_compatible() ? 2/3 of this patch would be removed.
>
> I patched this for OMAP5 (compile-tested only, no boards available) and
> came out with the patch below (still needs to be split):
>
> diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts
> index 08b7267..b3136e5 100644
> --- a/arch/arm/boot/dts/omap5-uevm.dts
> +++ b/arch/arm/boot/dts/omap5-uevm.dts
> @@ -13,7 +13,7 @@
>
> / {
> model = "TI OMAP5 uEVM board";
> - compatible = "ti,omap5-uevm", "ti,omap5";
> + compatible = "ti,omap5-uevm", "ti,omap5432-es2.0", "ti,omap5";
>
ok, nice and simpler way.
But would this make different revisions, to appear the same ?
Regards,
Sricharan
> memory {
> device_type = "memory";
> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
> index 07be2cd..a7bc906 100644
> --- a/arch/arm/boot/dts/omap5.dtsi
> +++ b/arch/arm/boot/dts/omap5.dtsi
> @@ -17,7 +17,7 @@
> #address-cells = <1>;
> #size-cells = <1>;
>
> - compatible = "ti,omap5";
> + compatible = "ti,omap5432-es2.0", "ti,omap5430-es2.0", "ti,omap5";
> interrupt-parent = <&gic>;
>
> aliases {
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 2dc62a2..ee94309 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -563,49 +563,6 @@ void __init omap4xxx_check_revision(void)
> pr_info("%s %s\n", soc_name, soc_rev);
> }
>
> -void __init omap5xxx_check_revision(void)
> -{
> - u32 idcode;
> - u16 hawkeye;
> - u8 rev;
> -
> - idcode = read_tap_reg(OMAP_TAP_IDCODE);
> - hawkeye = (idcode >> 12) & 0xffff;
> - rev = (idcode >> 28) & 0xff;
> - switch (hawkeye) {
> - case 0xb942:
> - switch (rev) {
> - case 0:
> - omap_revision = OMAP5430_REV_ES1_0;
> - break;
> - case 1:
> - default:
> - omap_revision = OMAP5430_REV_ES2_0;
> - }
> - break;
> -
> - case 0xb998:
> - switch (rev) {
> - case 0:
> - omap_revision = OMAP5432_REV_ES1_0;
> - break;
> - case 1:
> - default:
> - omap_revision = OMAP5432_REV_ES2_0;
> - }
> - break;
> -
> - default:
> - /* Unknown default to latest silicon rev as default*/
> - omap_revision = OMAP5430_REV_ES2_0;
> - }
> -
> - sprintf(soc_name, "OMAP%04x", omap_rev() >> 16);
> - sprintf(soc_rev, "ES%d.0", (omap_rev() >> 12) & 0xf);
> -
> - pr_info("%s %s\n", soc_name, soc_rev);
> -}
> -
> /*
> * Set up things for map_io and processor detection later on. Gets called
> * pretty much first thing from board init. For multi-omap, this gets
> diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
> index 4a3f06f..aa28940 100644
> --- a/arch/arm/mach-omap2/io.c
> +++ b/arch/arm/mach-omap2/io.c
> @@ -633,8 +633,7 @@ void __init omap4430_init_late(void)
> #ifdef CONFIG_SOC_OMAP5
> void __init omap5_init_early(void)
> {
> - omap2_set_globals_tap(OMAP54XX_CLASS,
> - OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE));
> + omap2_set_globals_tap(-1, OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE));
> omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE),
> OMAP2_L4_IO_ADDRESS(OMAP54XX_CTRL_BASE));
> omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRM_BASE));
> @@ -644,7 +643,6 @@ void __init omap5_init_early(void)
> omap_prm_base_init();
> omap_cm_base_init();
> omap44xx_prm_init();
> - omap5xxx_check_revision();
> omap54xx_voltagedomains_init();
> omap54xx_powerdomains_init();
> omap54xx_clockdomains_init();
> diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
> index 8c616e4..b8339ad 100644
> --- a/arch/arm/mach-omap2/soc.h
> +++ b/arch/arm/mach-omap2/soc.h
> @@ -35,6 +35,7 @@
> #ifndef __ASSEMBLY__
>
> #include <linux/bitops.h>
> +#include <linux/of.h>
>
> /*
> * Test if multicore OMAP support is needed
> @@ -194,7 +195,6 @@ IS_OMAP_CLASS(24xx, 0x24)
> IS_OMAP_CLASS(34xx, 0x34)
> IS_OMAP_CLASS(44xx, 0x44)
> IS_AM_CLASS(35xx, 0x35)
> -IS_OMAP_CLASS(54xx, 0x54)
> IS_AM_CLASS(33xx, 0x33)
> IS_AM_CLASS(43xx, 0x43)
>
> @@ -207,7 +207,6 @@ IS_OMAP_SUBCLASS(363x, 0x363)
> IS_OMAP_SUBCLASS(443x, 0x443)
> IS_OMAP_SUBCLASS(446x, 0x446)
> IS_OMAP_SUBCLASS(447x, 0x447)
> -IS_OMAP_SUBCLASS(543x, 0x543)
>
> IS_TI_SUBCLASS(816x, 0x816)
> IS_TI_SUBCLASS(814x, 0x814)
> @@ -373,10 +372,10 @@ IS_OMAP_TYPE(3430, 0x3430)
> # endif
>
> # if defined(CONFIG_SOC_OMAP5)
> -# undef soc_is_omap54xx
> -# undef soc_is_omap543x
> -# define soc_is_omap54xx() is_omap54xx()
> -# define soc_is_omap543x() is_omap543x()
> +# undef soc_is_omap54xx
> +# undef soc_is_omap543x
> +# define soc_is_omap54xx() (of_machine_is_compatible("ti,omap5"))
> +# define soc_is_omap543x() (soc_is_omap54xx())
> #endif
>
> /* Various silicon revisions for omap2 */
> @@ -437,16 +436,9 @@ IS_OMAP_TYPE(3430, 0x3430)
> #define OMAP447X_CLASS 0x44700044
> #define OMAP4470_REV_ES1_0 (OMAP447X_CLASS | (0x10 << 8))
>
> -#define OMAP54XX_CLASS 0x54000054
> -#define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8))
> -#define OMAP5430_REV_ES2_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x20 << 8))
> -#define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8))
> -#define OMAP5432_REV_ES2_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x20 << 8))
> -
> void omap2xxx_check_revision(void);
> void omap3xxx_check_revision(void);
> void omap4xxx_check_revision(void);
> -void omap5xxx_check_revision(void);
> void omap3xxx_check_features(void);
> void ti81xx_check_features(void);
> void am33xx_check_features(void);
>
next prev parent reply other threads:[~2013-07-30 14:18 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 11:25 [PATCH v2 0/8] DRA7xx core support Rajendra Nayak
2013-07-30 11:25 ` [PATCH v2 1/8] ARM: DRA7: id: Add cpu detection support for DRA7xx based SoCs' Rajendra Nayak
2013-07-30 13:10 ` Felipe Balbi
2013-07-30 13:18 ` Felipe Balbi
2013-07-30 13:55 ` Tony Lindgren
2013-07-30 14:18 ` Sricharan R [this message]
2013-07-30 14:23 ` Felipe Balbi
2013-07-30 14:36 ` Sricharan R
2013-07-30 15:32 ` Felipe Balbi
2013-07-30 18:37 ` Sricharan R
2013-07-30 18:43 ` Nishanth Menon
2013-07-31 6:02 ` Rajendra Nayak
2013-07-31 6:42 ` Tony Lindgren
2013-07-31 6:49 ` Rajendra Nayak
2013-07-30 11:25 ` [PATCH v2 2/8] ARM: DRA7: hwmod: Reuse the soc_ops used for OMAP4/5 Rajendra Nayak
2013-07-30 11:25 ` [PATCH v2 3/8] ARM: DRA7: Reuse all of PRCM and MPUSS SMP infra Rajendra Nayak
2013-07-30 12:26 ` Nishanth Menon
2013-07-30 12:38 ` Rajendra Nayak
2013-07-30 12:41 ` Nishanth Menon
2013-07-30 12:48 ` Rajendra Nayak
2013-07-30 12:57 ` Nishanth Menon
2013-07-30 12:59 ` Rajendra Nayak
2013-07-30 11:25 ` [PATCH v2 4/8] ARM: DRA7: Reuse io tables and add a new .init_early Rajendra Nayak
2013-07-30 11:25 ` [PATCH v2 5/8] ARM: DRA7: Resue the clocksource, clockevent support Rajendra Nayak
2013-07-30 11:25 ` [PATCH v2 6/8] ARM: DRA7: board-generic: Add basic DT support Rajendra Nayak
2013-07-30 11:25 ` [PATCH v2 7/8] ARM: DRA7: Kconfig: Make ARCH_NR_GPIO default to 512 Rajendra Nayak
2013-07-30 11:25 ` [PATCH v2 8/8] ARM: DRA7: dts: Add the dts files for dra7 SoC and dra7-evm board Rajendra Nayak
2013-07-30 12:30 ` Nishanth Menon
2013-07-30 12:41 ` Rajendra Nayak
2013-07-30 12:46 ` Nishanth Menon
2013-07-30 12:56 ` Rajendra Nayak
2013-07-30 12:59 ` Nishanth Menon
2013-07-30 13:01 ` Rajendra Nayak
2013-08-12 13:46 ` Benoit Cousson
2013-08-12 11:44 ` Mark Rutland
2013-08-13 7:24 ` Rajendra Nayak
2013-08-13 9:46 ` Mark Rutland
2013-08-13 10:05 ` Marc Zyngier
2013-08-14 9:40 ` Rajendra Nayak
2013-08-02 22:28 ` [PATCH v2 0/8] DRA7xx core support Santosh Shilimkar
2013-08-04 16:14 ` Rajendra Nayak
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=51F7CB2F.6070705@ti.com \
--to=r.sricharan@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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