]>
git.ipfire.org Git - people/ms/u-boot.git/blob - board/cm-bf537u/flash.c
ebe17b6531851e374965a840924001dc3dc71928
2 * flash.c - helper commands for working with GPIO-assisted flash
4 * Copyright (c) 2005-2009 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
11 #include <asm/blackfin.h>
12 #include "gpio_cfi_flash.h"
14 int do_ph(cmd_tbl_t
*cmdtp
, int flag
, int argc
, char *argv
[])
16 ulong faddr
= CONFIG_SYS_FLASH_BASE
;
21 dflg
= simple_strtoul(argv
[1], NULL
, 16);
22 faddr
|= (dflg
<< 21);
23 gpio_cfi_flash_swizzle((void *)faddr
);
25 data
= bfin_read_PORTHIO();
26 printf("Port H data %04x (PH0:%i)\n", data
, !!(data
& PH0
));
32 U_BOOT_CMD(ph
, 3, 0, do_ph
,
33 "set/clear PH0 GPIO flash bank switch\n",
34 "<ph0> - set PH0 GPIO pin state\n");