mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
arch: kona: Initial commit of kona-common architecture code
The Kona architecture is present on a number of Broadcom mobile SoCs including the bcm281xx family of chips. Signed-off-by: Darwin Rambo <drambo@broadcom.com> Reviewed-by: Steve Rae <srae@broadcom.com> Reviewed-by: Tim Kryger <tkryger@linaro.org>
This commit is contained in:
parent
1998a1a6c3
commit
b3134fce89
7 changed files with 100 additions and 0 deletions
|
@ -23,6 +23,7 @@ obj-y += nonsec_virt.o
|
|||
obj-y += virt-v7.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_KONA) += kona-common/
|
||||
obj-$(CONFIG_OMAP_COMMON) += omap-common/
|
||||
obj-$(CONFIG_TEGRA) += tegra-common/
|
||||
|
||||
|
|
9
arch/arm/cpu/armv7/kona-common/Makefile
Normal file
9
arch/arm/cpu/armv7/kona-common/Makefile
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Copyright 2013 Broadcom Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-y += s_init.o
|
||||
obj-y += hwinit-common.o
|
||||
obj-y += clk-stubs.o
|
21
arch/arm/cpu/armv7/kona-common/clk-stubs.c
Normal file
21
arch/arm/cpu/armv7/kona-common/clk-stubs.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright 2013 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/*
|
||||
* These weak functions are available to kona architectures that don't
|
||||
* require clock enables from the driver code.
|
||||
*/
|
||||
int __weak clk_sdio_enable(void *base, u32 rate, u32 *actual_ratep)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __weak clk_bsc_enable(void *base, u32 rate, u32 *actual_ratep)
|
||||
{
|
||||
return 0;
|
||||
}
|
16
arch/arm/cpu/armv7/kona-common/hwinit-common.c
Normal file
16
arch/arm/cpu/armv7/kona-common/hwinit-common.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright 2013 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/sizes.h>
|
||||
|
||||
#ifndef CONFIG_SYS_DCACHE_OFF
|
||||
void enable_caches(void)
|
||||
{
|
||||
/* Enable D-cache. I-cache is already enabled in start.S */
|
||||
dcache_enable();
|
||||
}
|
||||
#endif
|
12
arch/arm/cpu/armv7/kona-common/s_init.c
Normal file
12
arch/arm/cpu/armv7/kona-common/s_init.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Copyright 2014 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
/*
|
||||
* Early system init. Currently empty.
|
||||
*/
|
||||
void s_init(void)
|
||||
{
|
||||
}
|
29
arch/arm/include/asm/kona-common/clk.h
Normal file
29
arch/arm/include/asm/kona-common/clk.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright 2013 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
/* This API file is loosely based on u-boot/drivers/video/ipu.h and linux */
|
||||
|
||||
#ifndef __KONA_COMMON_CLK_H
|
||||
#define __KONA_COMMON_CLK_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct clk;
|
||||
|
||||
/* Only implement required functions for your specific architecture */
|
||||
int clk_init(void);
|
||||
struct clk *clk_get(const char *id);
|
||||
int clk_enable(struct clk *clk);
|
||||
void clk_disable(struct clk *clk);
|
||||
unsigned long clk_get_rate(struct clk *clk);
|
||||
long clk_round_rate(struct clk *clk, unsigned long rate);
|
||||
int clk_set_rate(struct clk *clk, unsigned long rate);
|
||||
int clk_set_parent(struct clk *clk, struct clk *parent);
|
||||
struct clk *clk_get_parent(struct clk *clk);
|
||||
int clk_sdio_enable(void *base, u32 rate, u32 *actual_ratep);
|
||||
int clk_bsc_enable(void *base);
|
||||
|
||||
#endif
|
12
arch/arm/include/asm/kona-common/kona_sdhci.h
Normal file
12
arch/arm/include/asm/kona-common/kona_sdhci.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Copyright 2013 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#ifndef __KONA_SDHCI_H
|
||||
#define __KONA_SDHCI_H
|
||||
|
||||
int kona_sdhci_init(int dev_index, u32 min_clk, u32 quirks);
|
||||
|
||||
#endif
|
Loading…
Add table
Reference in a new issue