Merge branch 'for-next/am335x'
This commit is contained in:
commit
1e5b933b5d
|
@ -32,21 +32,11 @@
|
|||
#include <mach/am33xx-silicon.h>
|
||||
#include <mach/bbu.h>
|
||||
|
||||
static int ksz9031rn_phy_fixup(struct phy_device *dev)
|
||||
{
|
||||
phy_write_mmd_indirect(dev, 6, 2, 0);
|
||||
phy_write_mmd_indirect(dev, 8, 2, 0x003ff);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pfla03_coredevice_init(void)
|
||||
{
|
||||
if (!of_machine_is_compatible("phytec,phyflex-am335x-som"))
|
||||
return 0;
|
||||
|
||||
phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK,
|
||||
ksz9031rn_phy_fixup);
|
||||
am33xx_register_ethaddr(0, 0);
|
||||
am33xx_register_ethaddr(1, 1);
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ CONFIG_OF_BAREBOX_DRIVERS=y
|
|||
CONFIG_DRIVER_SERIAL_NS16550=y
|
||||
CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
|
||||
CONFIG_DRIVER_NET_CPSW=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_NET_USB=y
|
||||
CONFIG_NET_USB_ASIX=y
|
||||
CONFIG_NET_USB_SMSC95XX=y
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
CONFIG_ARCH_OMAP=y
|
||||
CONFIG_OMAP_BUILD_IFT=y
|
||||
CONFIG_OMAP_SERIALBOOT=y
|
||||
CONFIG_OMAP_MULTI_BOARDS=y
|
||||
CONFIG_MACH_AFI_GF=y
|
||||
CONFIG_MACH_BEAGLEBONE=y
|
||||
CONFIG_MACH_PCM051=y
|
||||
CONFIG_MACH_PFLA03=y
|
||||
CONFIG_THUMB2_BAREBOX=y
|
||||
# CONFIG_CMD_ARM_CPUINFO is not set
|
||||
# CONFIG_MEMINFO is not set
|
||||
CONFIG_MMU=y
|
||||
CONFIG_TEXT_BASE=0x0
|
||||
|
@ -37,10 +37,8 @@ CONFIG_NAND_OMAP_GPMC=y
|
|||
CONFIG_MCI=y
|
||||
# CONFIG_MCI_WRITE is not set
|
||||
CONFIG_MCI_OMAP_HSMMC=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_SINGLE=y
|
||||
CONFIG_BUS_OMAP_GPMC=y
|
||||
# CONFIG_FS_RAMFS is not set
|
||||
# CONFIG_FS_DEVFS is not set
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_FAT_LFN=y
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */
|
||||
0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */
|
||||
0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */
|
||||
0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */
|
||||
0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */
|
||||
0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */
|
||||
0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */
|
||||
|
|
|
@ -118,6 +118,15 @@ config OMAP4_USBBOOT
|
|||
You need the utility program omap4_usbboot to boot from USB.
|
||||
Please read omap4_usb_booting.txt for more information.
|
||||
|
||||
config OMAP_SERIALBOOT
|
||||
bool "enable booting from serial"
|
||||
select XYMODEM
|
||||
select FS_RAMFS
|
||||
depends on ARCH_AM33XX && SHELL_NONE
|
||||
help
|
||||
Say Y here if you want to load the 2nd stage barebox.bin with
|
||||
xmodem after booting from serial line.
|
||||
|
||||
config OMAP_MULTI_BOARDS
|
||||
bool "Allow multiple boards to be selected"
|
||||
select HAVE_DEFAULT_ENVIRONMENT_NEW
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <sizes.h>
|
||||
#include <malloc.h>
|
||||
#include <filetype.h>
|
||||
#include <xymodem.h>
|
||||
#include <mach/generic.h>
|
||||
|
||||
struct omap_barebox_part *barebox_part;
|
||||
|
@ -184,6 +185,45 @@ static void *omap4_xload_boot_usb(void){
|
|||
return buf;
|
||||
}
|
||||
|
||||
static void *omap_serial_boot(void){
|
||||
struct console_device *cdev;
|
||||
int ret;
|
||||
void *buf;
|
||||
int len;
|
||||
int fd;
|
||||
|
||||
/* need temporary place to store file */
|
||||
ret = mount("none", "ramfs", "/", NULL);
|
||||
if (ret < 0) {
|
||||
printf("failed to mount ramfs\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cdev = console_get_first_active();
|
||||
if (!cdev) {
|
||||
printf("failed to get console\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fd = open("/barebox.bin", O_WRONLY | O_CREAT);
|
||||
if (fd < 0) {
|
||||
printf("could not create barebox.bin\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ret = do_load_serial_xmodem(cdev, fd);
|
||||
if (ret < 0) {
|
||||
printf("loadx failed\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
buf = read_file("/barebox.bin", &len);
|
||||
if (!buf)
|
||||
printf("could not read barebox.bin from serial\n");
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Replaces the default shell in xload configuration
|
||||
*/
|
||||
|
@ -218,6 +258,12 @@ static __noreturn int omap_xload(void)
|
|||
func = omap_xload_boot_spi(barebox_part->nor_offset,
|
||||
barebox_part->nor_size);
|
||||
break;
|
||||
case BOOTSOURCE_SERIAL:
|
||||
if (IS_ENABLED(CONFIG_OMAP_SERIALBOOT)) {
|
||||
printf("booting from serial\n");
|
||||
func = omap_serial_boot();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
printf("unknown boot source. Fall back to nand\n");
|
||||
func = omap_xload_boot_nand(barebox_part->nand_offset,
|
||||
|
|
Loading…
Reference in New Issue