summaryrefslogtreecommitdiff
path: root/bus.c
diff options
context:
space:
mode:
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;