summaryrefslogtreecommitdiff
path: root/bus.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-10-16 14:32:37 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-10-16 14:32:37 -0400
commitc9e5da5a3dc1eca72f81761f63648057be276db4 (patch)
tree48ee68edb9df11032b6c0f1095d3b8bdd0ae228a /bus.c
parenta7f7e85022298b150671daaa7b5411ffde1960bf (diff)
reduce scope of some constants and variables
Diffstat (limited to 'bus.c')
-rw-r--r--bus.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bus.c b/bus.c
index abb5b5c..01d4040 100644
--- a/bus.c
+++ b/bus.c
@@ -177,10 +177,6 @@ static void gpmc_printinfo()
static void gpmc_setup(void)
{
- int chipselect = 0;
- int size = GPMC_SIZE_16MB;
- bool enablecs = true;
- int baseaddress = 1;
int CSWROFFTIME = TOTAL_IO_CYCLE;
@@ -231,11 +227,15 @@ static void gpmc_setup(void)
pinmux_configurepin("lcd_data6", PULL_UP | MODE_1);
pinmux_configurepin("lcd_data7", PULL_UP | MODE_1);
- int displacement = GPMC_CHIPSELECTCONFIGDISPLACEMENT * chipselect;
-
gpmc_mapregisters();
if (registers != MAP_FAILED) {
+ int chipselect = 0;
+ int size = GPMC_SIZE_16MB;
+ bool enablecs = true;
+ int baseaddress = 1;
+ int displacement = GPMC_CHIPSELECTCONFIGDISPLACEMENT * chipselect;
+
// disable before playing with the registers..
*(registers + displacement + GPMC_CONFIG7) = 0x0;