Re: [PATCH v2 1/3] ARM: OMAP: Beagle: revision detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Robert Nelson <robertcnelson@xxxxxxxxx> [100812 02:30]:
> Due to the omap3530 ES3.0 Silicon being used on both the
> B5/B6 and C1/2/3 Beagle we can't use the cpu_is_omap34xx() 
> routines to differentiate the Beagle Boards.
> 
> However gpio pins 171,172,173 where setup for this prupose, so 
> lets use them.

<snip>

> --- a/arch/arm/plat-omap/include/plat/board.h
> +++ b/arch/arm/plat-omap/include/plat/board.h
> @@ -26,6 +26,22 @@ enum {
>  	OMAP3EVM_BOARD_GEN_2,		/* EVM Rev >= Rev E */
>  };
>  
> +/*
> + * OMAP3 Beagle revision
> + * Run time detection of Beagle revision is done by reading GPIO.
> + * GPIO ID -
> + *	AXBX	= GPIO173, GPIO172, GPIO171: 1 1 1
> + *	C1_3	= GPIO173, GPIO172, GPIO171: 1 1 0
> + *	C4	= GPIO173, GPIO172, GPIO171: 1 0 1
> + *	XM	= GPIO173, GPIO172, GPIO171: 0 0 0
> + */
> +enum {
> +	OMAP3BEAGLE_BOARD_AXBX = 0,
> +	OMAP3BEAGLE_BOARD_C1_3,
> +	OMAP3BEAGLE_BOARD_C4,
> +	OMAP3BEAGLE_BOARD_XM,
> +};
> +
>  /* Different peripheral ids */
>  #define OMAP_TAG_CLOCK		0x4f01
>  #define OMAP_TAG_LCD		0x4f05
> @@ -173,4 +189,11 @@ u8 get_omap3_evm_rev(void);
>  #else
>  #define get_omap3_evm_rev() (-EINVAL)
>  #endif
> +
> +/* Beagle revision */
> +#if defined(CONFIG_MACH_OMAP3_BEAGLE)
> +u8 get_omap3_beagle_rev(void);
> +#else
> +#define get_omap3_beagle_rev() (-EINVAL)
> +#endif
>  #endif

You should be able to keep this all in board-omap3beagle.c,
no need for the header. If this header is needed somewhere
else, chances are that something is wrong.

For the drivers, you should be able to pass the necessary
flags via platform_data if needed.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux