From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] Exynos5800: Add support for Exynos5800
Date: Tue, 04 Nov 2014 13:56:00 +0900 [thread overview]
Message-ID: <54585C60.1090107@samsung.com> (raw)
In-Reply-To: <1414757284-32067-3-git-send-email-human.hwang@samsung.com>
On 10/31/2014 09:08 PM, Hyungwon Hwang wrote:
> The gpios of Exynos5800 are different from that of Exynos5420. This patch adds
> the gpio information and table of Exynos5800.
>
> Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
> ---
> arch/arm/include/asm/arch-exynos/gpio.h | 31 +++++++++++++++++++++++++++++--
> drivers/gpio/s5p_gpio.c | 4 +++-
> 2 files changed, 32 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h
> index 431ae3a..8f82ef0 100644
> --- a/arch/arm/include/asm/arch-exynos/gpio.h
> +++ b/arch/arm/include/asm/arch-exynos/gpio.h
> @@ -1368,11 +1368,21 @@ static struct gpio_info exynos5420_gpio_data[EXYNOS5420_GPIO_NUM_PARTS] = {
> { EXYNOS5420_GPIO_PART5_BASE, EXYNOS5420_GPIO_MAX_PORT },
> };
>
> +#define EXYNOS5800_GPIO_NUM_PARTS 4
> +static struct gpio_info exynos5800_gpio_data[EXYNOS5800_GPIO_NUM_PARTS] = {
> + { EXYNOS5420_GPIO_PART1_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_1 },
> + { EXYNOS5420_GPIO_PART2_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_2 },
> + { EXYNOS5420_GPIO_PART3_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_3 },
> + { EXYNOS5420_GPIO_PART4_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_4 },
you refer to other gpio_data.
You mentioned "different from that of exynos5420", but used EXYNOS5420_GPIO_XXX.
It's strange.
> +};
> +
> static inline struct gpio_info *get_gpio_data(void)
> {
> if (cpu_is_exynos5()) {
> - if (proid_is_exynos5420() || proid_is_exynos5800())
> + if (proid_is_exynos5420())
> return exynos5420_gpio_data;
> + else if (proid_is_exynos5800())
> + return exynos5800_gpio_data;
> else
> return exynos5_gpio_data;
> } else if (cpu_is_exynos4()) {
> @@ -1388,8 +1398,10 @@ static inline struct gpio_info *get_gpio_data(void)
> static inline unsigned int get_bank_num(void)
> {
> if (cpu_is_exynos5()) {
> - if (proid_is_exynos5420() || proid_is_exynos5800())
> + if (proid_is_exynos5420())
> return EXYNOS5420_GPIO_NUM_PARTS;
> + if (proid_is_exynos5800())
else if (prod_is_exynos5800())
Best Regard,
Jaehoon Chung
> + return EXYNOS5800_GPIO_NUM_PARTS;
> else
> return EXYNOS5_GPIO_NUM_PARTS;
> } else if (cpu_is_exynos4()) {
> @@ -1493,6 +1505,21 @@ static const struct gpio_name_num_table exynos5420_gpio_table[] = {
> { 0 }
> };
>
> +static const struct gpio_name_num_table exynos5800_gpio_table[] = {
> + GPIO_ENTRY('x', EXYNOS5420_GPIO_X00, EXYNOS5420_GPIO_C00, 0),
> + GPIO_ENTRY('c', EXYNOS5420_GPIO_C00, EXYNOS5420_GPIO_D10, 0),
> + GPIO_ENTRY('d', EXYNOS5420_GPIO_D10, EXYNOS5420_GPIO_Y00, 0),
> + GPIO_ENTRY('y', EXYNOS5420_GPIO_Y00, EXYNOS5420_GPIO_E00, 0),
> + GPIO_ENTRY('e', EXYNOS5420_GPIO_E00, EXYNOS5420_GPIO_F00, 0),
> + GPIO_ENTRY('f', EXYNOS5420_GPIO_F00, EXYNOS5420_GPIO_G00, 0),
> + GPIO_ENTRY('g', EXYNOS5420_GPIO_G00, EXYNOS5420_GPIO_J40, 0),
> + GPIO_ENTRY('j', EXYNOS5420_GPIO_J40, EXYNOS5420_GPIO_A00, 0),
> + GPIO_ENTRY('a', EXYNOS5420_GPIO_A00, EXYNOS5420_GPIO_B00, 0),
> + GPIO_ENTRY('b', EXYNOS5420_GPIO_B00, EXYNOS5420_GPIO_H00, 0),
> + GPIO_ENTRY('h', EXYNOS5420_GPIO_H00, EXYNOS5420_GPIO_Z0, 0),
> + { 0 }
> +};
> +
> void gpio_cfg_pin(int gpio, int cfg);
> void gpio_set_pull(int gpio, int mode);
> void gpio_set_drv(int gpio, int mode);
> diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
> index bcf44eb..bed7cd7 100644
> --- a/drivers/gpio/s5p_gpio.c
> +++ b/drivers/gpio/s5p_gpio.c
> @@ -57,11 +57,13 @@ static inline int s5p_name_to_gpio(const char *name)
> */
> #if defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5)
> if (cpu_is_exynos5()) {
> - if (proid_is_exynos5420() || proid_is_exynos5800()) {
> + if (proid_is_exynos5420()) {
> tabp = exynos5420_gpio_table;
> irregular_bank_name = 'y';
> irregular_set_number = '7';
> irregular_bank_base = EXYNOS5420_GPIO_Y70;
> + } else if (proid_is_exynos5800()) {
> + tabp = exynos5800_gpio_table;
> } else {
> tabp = exynos5_gpio_table;
> irregular_bank_name = 'c';
>
next prev parent reply other threads:[~2014-11-04 4:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 12:08 [U-Boot] [PATCH 0/4] Adds support for Exynos5422 odroid xu3 board Hyungwon Hwang
2014-10-31 12:08 ` [U-Boot] [PATCH 1/4] exynos5: fix GPIO information of exynos5420 Hyungwon Hwang
2014-11-04 4:51 ` Jaehoon Chung
2014-11-04 5:13 ` Hyungwon Hwang
2014-10-31 12:08 ` [U-Boot] [PATCH 2/4] Exynos5800: Add support for Exynos5800 Hyungwon Hwang
2014-11-04 4:56 ` Jaehoon Chung [this message]
2014-11-04 5:05 ` Hyungwon Hwang
2014-10-31 12:08 ` [U-Boot] [PATCH 3/4] odroid: make some macros common Hyungwon Hwang
2014-10-31 12:08 ` [U-Boot] [PATCH 4/4] Odroid-XU3: Add support for Odroid-XU3 Hyungwon Hwang
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=54585C60.1090107@samsung.com \
--to=jh80.chung@samsung.com \
--cc=u-boot@lists.denx.de \
/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