Skip to content

Commit

Permalink
blackfin: scb: Add system crossbar init code.
Browse files Browse the repository at this point in the history
If SCB exists in select blackfin cpu, developer can change the SCB
priority in kernel configuration.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Steven Miao <realmz6@gmail.com>
  • Loading branch information
Steven Miao committed Sep 13, 2013
1 parent 6e46645 commit 24a70cf
Show file tree
Hide file tree
Showing 7 changed files with 1,331 additions and 0 deletions.
21 changes: 21 additions & 0 deletions arch/blackfin/include/asm/scb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* arch/blackfin/mach-common/scb-init.c - reprogram system cross bar priority
*
* Copyright 2012 Analog Devices Inc.
*
* Licensed under the GPL-2 or later.
*/

#define SCB_SLOT_OFFSET 24
#define SCB_MI_MAX_SLOT 32

struct scb_mi_prio {
unsigned long scb_mi_arbr;
unsigned long scb_mi_arbw;
unsigned char scb_mi_slots;
unsigned char scb_mi_prio[SCB_MI_MAX_SLOT];
};

extern struct scb_mi_prio scb_data[];

extern void init_scb(void);
6 changes: 6 additions & 0 deletions arch/blackfin/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#ifdef CONFIG_BF60x
#include <mach/pm.h>
#endif
#ifdef CONFIG_SCB_PRIORITY
#include <asm/scb.h>
#endif

u16 _bfin_swrst;
EXPORT_SYMBOL(_bfin_swrst);
Expand Down Expand Up @@ -1101,6 +1104,9 @@ void __init setup_arch(char **cmdline_p)
#endif
init_exception_vectors();
bfin_cache_init(); /* Initialize caches for the boot CPU */
#ifdef CONFIG_SCB_PRIORITY
init_scb();
#endif
}

static int __init topology_init(void)
Expand Down
Loading

0 comments on commit 24a70cf

Please sign in to comment.