alistair23-linux/arch/arm/mach-bcm/board_bcm281xx.c
Olof Johansson 6216650a7a BCM changes for 3.13/soc. A number of cleanup related changes.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJScKOTAAoJEPYb7NoJr+nL+fwP/1bZKlbqYURXdrjLxHTZGKp3
 WBpo8KUYp80nAZpw1SLoOk/78ciulQ0VLifWMebzMd/1qXXnek71jfYusbSb7MeM
 e70y9TRtXrfkDPxL12XTXIf6F7JieGtVx0S2jJsGsofmM0w6b723KwZAYZgxACYB
 Ec7TSzwaTlBBCI+ZyouS8e4CkS0x/0Mpkj8Ym8FDhKnwTs/mtD9kOcgVBzfz0Bt8
 ExtiAsASeDvxUq5zskOiGiEhaNlhbQHd8etLIHEBTRreYQRg8nWTI+fdKKqwHKi0
 qHm7p/ZcVQUgqf/2EjEfbEa0sQrQKrH82oaJirY3A6QrIEVQ5OVZCThkcvVV5Bxo
 w1jDJcxYl2PEM/awR1YkRT3KQKb13J2PxbLFTYnKyhKgZz4mvB/NnjI1AuskTiS8
 ddYfJ5apOqtZBqIYQvM6fv69mSWNinhmOqze14ulxGn+U6CVEYsGcQY1QvgA7T+c
 0JAAUJwgRsJ+jIDjzx4EJFYCEpdRY8NAKNnZmPr8maP7DIttsbZd0KjWTTqg1Y1N
 RHJkxJtnSxJYxfXkgpADJJNjcPdYxqfoYSpcRrGpFM3XLyCPKu2FiahpACyjua3W
 JPzRGuYr4I51D16uHiYLxkDSwBKLYBlzyi5bzb+hed9nhoeynvOYtZZkuVgqVRKT
 QJwnbUpxU1m870cNpAm/
 =fAes
 -----END PGP SIGNATURE-----

Merge tag 'bcm-for-3.13-soc2' of git://github.com/broadcom/bcm11351 into next/soc

From Christian Daudt, BCM changes for 3.13/soc. Mostly cleanups and
renaming of kernel config options, pushing down the mobile platforms
one level in the naming scheme, keeping ARCH_BCM as a wider family
config option.

* tag 'bcm-for-3.13-soc2' of git://github.com/broadcom/bcm11351:
  ARM: bcm_defconfig: Run "make savedefconfig"
  ARM: bcm281xx: Add ARCH Timers to config
  rename ARCH_BCM to ARCH_BCM_MOBILE (mach-bcm)
  ARM: bcm281xx: more descriptive machine string
  ARM: bcm281xx: Enable GPIO driver

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-30 14:03:39 -07:00

75 lines
1.9 KiB
C

/*
* Copyright (C) 2012-2013 Broadcom Corporation
*
* 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 version 2.
*
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
* kind, whether express or implied; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/of_platform.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/clocksource.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <asm/hardware/cache-l2x0.h>
#include "bcm_kona_smc.h"
#include "kona.h"
static int __init kona_l2_cache_init(void)
{
if (!IS_ENABLED(CONFIG_CACHE_L2X0))
return 0;
if (bcm_kona_smc_init() < 0) {
pr_info("Kona secure API not available. Skipping L2 init\n");
return 0;
}
bcm_kona_smc(SSAPI_ENABLE_L2_CACHE, 0, 0, 0, 0);
/*
* The aux_val and aux_mask have no effect since L2 cache is already
* enabled. Pass 0s for aux_val and 1s for aux_mask for default value.
*/
return l2x0_of_init(0, ~0);
}
static void bcm_board_setup_restart(void)
{
struct device_node *np;
np = of_find_compatible_node(NULL, NULL, "brcm,bcm11351");
if (np) {
if (of_device_is_available(np))
bcm_kona_setup_restart();
of_node_put(np);
}
/* Restart setup for other boards goes here */
}
static void __init board_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL,
&platform_bus);
bcm_board_setup_restart();
kona_l2_cache_init();
}
static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, };
DT_MACHINE_START(BCM11351_DT, "BCM281xx Broadcom Application Processor")
.init_machine = board_init,
.restart = bcm_kona_restart,
.dt_compat = bcm11351_dt_compat,
MACHINE_END