Beispiel #1
0
static int usb_a9260_console_init(void)
{
	struct device_d *dev;

	if (machine_is_usb_a9260()) {
		barebox_set_model("Calao USB-A9260");
		barebox_set_hostname("usb-a9260");
	} else if (machine_is_usb_a9g20()) {
		barebox_set_model("Calao USB-A9G20");
		barebox_set_hostname("usb-a9g20");
	} else {
		barebox_set_model("Calao USB-A9263");
		barebox_set_hostname("usb-a9263");
	}

	at91_register_uart(0, 0);

	if (IS_ENABLED(CONFIG_CALAO_DAB_MMX)) {
		at91_register_uart(2, 0);

		dev = at91_register_uart(4, 0);
		dev_set_param(dev, "active", "");
	}

	return 0;
}
Beispiel #2
0
static int physom_devices_init(void)
{
	if (!of_machine_is_compatible("phytec,am335x-som"))
		return 0;

	switch (bootsource_get()) {
	case BOOTSOURCE_SPI:
		of_device_enable_path("/chosen/environment-spi");
		break;
	case BOOTSOURCE_MMC:
		if (bootsource_get_instance() == 0)
			omap_set_bootmmc_devname("mmc0");
		else
			omap_set_bootmmc_devname("mmc1");
		break;
	default:
		of_device_enable_path("/chosen/environment-nand");
		break;
	}

	omap_set_barebox_part(&physom_barebox_part);
	defaultenv_append_directory(defaultenv_physom_am335x);

	/* Special module set up */
	if (of_machine_is_compatible("phytec,phycore-am335x-som")) {
		armlinux_set_architecture(MACH_TYPE_PCM051);
		barebox_set_hostname("pcm051");
	}

	if (of_machine_is_compatible("phytec,phyflex-am335x-som")) {
		armlinux_set_architecture(MACH_TYPE_PFLA03);
		am33xx_select_rmii2_crs_dv();
		barebox_set_hostname("pfla03");
	}

	if (of_machine_is_compatible("phytec,phycard-am335x-som")) {
		armlinux_set_architecture(MACH_TYPE_PCAAXS1);
		barebox_set_hostname("pcaaxs1");
	}

	/* Register update handler */
	am33xx_bbu_spi_nor_mlo_register_handler("MLO.spi", "/dev/m25p0.xload");
	am33xx_bbu_spi_nor_register_handler("spi", "/dev/m25p0.barebox");
	am33xx_bbu_nand_xloadslots_register_handler("MLO.nand",
		xloadslots, ARRAY_SIZE(xloadslots));
	am33xx_bbu_nand_slots_register_handler("nand", nandslots,
				ARRAY_SIZE(nandslots));

	if (IS_ENABLED(CONFIG_SHELL_NONE))
		return am33xx_of_register_bootdevice();

	return 0;
}
Beispiel #3
0
static int qil_a9260_main_clock(void)
{
	if (machine_is_qil_a9g20()) {
		barebox_set_model("Calao QIL-a9G20");
		barebox_set_hostname("qil-a9g20");
	} else {
		barebox_set_model("Calao QIL-A9260");
		barebox_set_hostname("qil-a9260");
	}

	at91_set_main_clock(12000000);
	return 0;
}
Beispiel #4
0
static int at91sam9261ek_console_init(void)
{
    if (machine_is_at91sam9g10ek()) {
        barebox_set_model("Atmel at91sam9g10-ek");
        barebox_set_hostname("at91sam9g10-ek");
    } else {
        barebox_set_model("Atmel at91sam9261-ek");
        barebox_set_hostname("at91sam9261-ek");
    }

    at91_register_uart(0, 0);
    return 0;
}
Beispiel #5
0
static int rdu2_devices_init(void)
{
	struct i2c_client client;

	if (!of_machine_is_compatible("zii,imx6q-zii-rdu2") &&
	    !of_machine_is_compatible("zii,imx6qp-zii-rdu2"))
		return 0;

	client.adapter = i2c_get_adapter(1);
	if (client.adapter) {
		u8 reg;

		/*
		 * Reset PMIC SW1AB and SW1C rails to 1.375V. If an event
		 * caused only the i.MX6 SoC reset, the PMIC might still be
		 * stuck on the low voltage for the slow operating point.
		 */
		client.addr = 0x08; /* PMIC i2c address */
		reg = 0x2b; /* 1.375V, valid for both rails */
		i2c_write_reg(&client, 0x20, &reg, 1);
		i2c_write_reg(&client, 0x2e, &reg, 1);
	}

	barebox_set_hostname("rdu2");

	imx6_bbu_internal_spi_i2c_register_handler("SPI", "/dev/m25p0.barebox",
						   BBU_HANDLER_FLAG_DEFAULT);

	imx6_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc3", 0);

	defaultenv_append_directory(defaultenv_rdu2);

	return 0;
}
Beispiel #6
0
static int tqma53_devices_init(void)
{
    char *of_env_path;
    unsigned bbu_flag_emmc = 0, bbu_flag_sd = 0;

    if (!of_machine_is_compatible("tq,tqma53"))
        return 0;

    barebox_set_hostname("tqma53");

    if (bootsource_get() == BOOTSOURCE_MMC &&
            bootsource_get_instance() == 1) {
        of_env_path = "/chosen/environment-sd";
        bbu_flag_sd = BBU_HANDLER_FLAG_DEFAULT;
    } else {
        of_env_path = "/chosen/environment-emmc";
        bbu_flag_emmc = BBU_HANDLER_FLAG_DEFAULT;
    }

    imx53_bbu_internal_mmc_register_handler("sd", "/dev/mmc1", bbu_flag_sd);
    imx53_bbu_internal_mmc_register_handler("emmc", "/dev/mmc2", bbu_flag_emmc);

    of_device_enable_path(of_env_path);

    armlinux_set_architecture(MACH_TYPE_TQMA53);

    return 0;
}
static int vpb_console_init(void)
{
	barebox_set_model("ARM Versatile/PB (ARM926EJ-S)");
	barebox_set_hostname("versatilepb");

	versatile_register_uart(0);
	return 0;
}
Beispiel #8
0
static int a9m2440_console_init(void)
{
	barebox_set_model("Digi A9M2440");
	barebox_set_hostname("a9m2440");

	s3c24xx_add_uart1();
	return 0;
}
Beispiel #9
0
static int dss11_console_init(void)
{
	barebox_set_model("Aizo dSS11");
	barebox_set_hostname("dss11");

	at91_register_uart(0, 0);
	return 0;
}
Beispiel #10
0
static int at91sam9263ek_console_init(void)
{
	barebox_set_model("Atmel at91sam9263-ek");
	barebox_set_hostname("at91sam9263-ek");

	at91_register_uart(0, 0);
	return 0;
}
Beispiel #11
0
static int mem_init(void)
{
	barebox_set_model("Netgear wg102");
	barebox_set_hostname("wg102");

	mips_add_ram0(SZ_16M);
	return 0;
}
Beispiel #12
0
static int sabresd_core_init(void)
{
	imx6_init_lowlevel();

	barebox_set_hostname("sabresd");

	return 0;
}
Beispiel #13
0
static int lubbock_coredevice_init(void)
{
	barebox_set_model("Lubbock PXA25x");
	barebox_set_hostname("lubbock");
	pxa2xx_mfp_config(ARRAY_AND_SIZE(lubbock_pin_config));
	smc_init();
	return 0;
}
Beispiel #14
0
static int pm9g45_console_init(void)
{
	barebox_set_model("Ronetix PM9G45");
	barebox_set_hostname("pm9g45");

	at91_register_uart(0, 0);
	return 0;
}
Beispiel #15
0
static int mx27ads_console_init(void)
{
	barebox_set_model("Freescale i.MX27 ADS");
	barebox_set_hostname("mx27ads");

	imx27_add_uart0();
	return 0;
}
Beispiel #16
0
static int eukrea_cpuimx35_console_init(void)
{
	barebox_set_model("Eukrea CPUIMX35");
	barebox_set_hostname("eukrea-cpuimx35");

	imx35_add_uart0();
	return 0;
}
Beispiel #17
0
static int clps711x_console_init(void)
{
	barebox_set_model("Cirrus Logic CLEP7212");
	barebox_set_hostname("clep7212");

	clps711x_add_uart(0);

	return 0;
}
Beispiel #18
0
static int imx6sx_udoneo_coredevices_init(void)
{
	if (!of_machine_is_compatible("fsl,imx6sx-udoo-neo"))
		return 0;

	barebox_set_hostname("mx6sx-udooneo");

	return 0;
}
Beispiel #19
0
/**
 * @brief UART serial port initialization - remember to enable COM clocks in
 * arch
 *
 * @return result of device registration
 */
static int beagle_console_init(void)
{
	barebox_set_model("Texas Instruments beagle");
	barebox_set_hostname("beagle");

	omap3_add_uart3();

	return 0;
}
Beispiel #20
0
static int neso_console_init(void)
{
	barebox_set_model("Garz & Fricke NESO");
	barebox_set_hostname("neso");

	imx27_add_uart0();

	return 0;
}
Beispiel #21
0
static int sama5d3_xplained_console_init(void)
{
	barebox_set_model("Atmel sama5d3_xplained");
	barebox_set_hostname("sama5d3_xplained");

	at91_register_uart(0, 0);

	return 0;
}
Beispiel #22
0
/**
 * @brief UART serial port initialization - remember to enable COM clocks in arch
 *
 * @return result of device registration
 */
static int sdp3430_console_init(void)
{
	barebox_set_model("Texas Instruments SDP343x");
	barebox_set_hostname("sdp343x");

	omap3_add_uart3();

	return 0;
}
Beispiel #23
0
static int tny_a9260_console_init(void)
{
	if (machine_is_tny_a9g20()) {
		barebox_set_model("Calao TNY-A9G20");
		barebox_set_hostname("tny-a9g20");
	} else if (machine_is_tny_a9263()) {
		barebox_set_model("Calao TNY-A9263");
		barebox_set_hostname("tny-a9263");
	} else {
		barebox_set_model("Calao TNY-A9260");
		barebox_set_hostname("tny-a9260");
	}

	at91_register_uart(0, 0);
	if (IS_ENABLED(CONFIG_CALAO_MOB_TNY_MD2))
		at91_register_uart(2, ATMEL_UART_CTS | ATMEL_UART_RTS);
	return 0;
}
Beispiel #24
0
/**
 * @brief Initialize the serial port to be used as console.
 *
 * @return result of device registration
 */
static int pcaal1_init_console(void)
{
    barebox_set_model("Phytec phyCARD-OMAP3");
    barebox_set_hostname("phycard-omap3");

    omap3_add_uart3();

    return 0;
}
Beispiel #25
0
static int pcm049_console_init(void)
{
	barebox_set_model("Phytec phyCORE-OMAP4460");
	barebox_set_hostname("phycore-omap4460");

	omap44xx_add_uart3();

	return 0;
}
Beispiel #26
0
static int imx23_olinuxino_console_init(void)
{
	barebox_set_model("Olimex.ltd imx233-olinuxino");
	barebox_set_hostname("imx233-olinuxino");

	add_generic_device("stm_serial", 0, NULL, IMX_DBGUART_BASE, 8192,
			   IORESOURCE_MEM, NULL);

	return 0;
}
Beispiel #27
0
static int cfa10036_console_init(void)
{
	barebox_set_model("crystalfontz-cfa10036");
	barebox_set_hostname("cfa10036");

	add_generic_device("stm_serial", 0, NULL, IMX_DBGUART_BASE, SZ_8K,
			   IORESOURCE_MEM, NULL);

	return 0;
}
Beispiel #28
0
static int mx23_evk_console_init(void)
{
	barebox_set_model("Freescale i.MX23 EVK");
	barebox_set_hostname("mx23evk");

	add_generic_device("stm_serial", 0, NULL, IMX_DBGUART_BASE, 8192,
			   IORESOURCE_MEM, NULL);
	
	return 0;
}
Beispiel #29
0
static int tx25_console_init(void)
{
	mxc_iomux_v3_setup_multiple_pads(tx25_pads, ARRAY_SIZE(tx25_pads));

	barebox_set_model("Ka-Ro TX25");
	barebox_set_hostname("tx25");

	imx25_add_uart0();
	return 0;
}
Beispiel #30
0
static int imx31_console_init(void)
{
	imx_iomux_setup_multiple_pins(pcm037_iomux, ARRAY_SIZE(pcm037_iomux));

	barebox_set_model("Phytec phyCORE-i.MX31");
	barebox_set_hostname("phycore-imx31");

	imx31_add_uart0();
	return 0;
}