[PATCH 07/11] ARM: Add Altera SoCFPGA support
Sascha Hauer
s.hauer at pengutronix.de
Wed Sep 18 04:06:28 EDT 2013
On Tue, Sep 17, 2013 at 04:46:49PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > +
> > + if (IS_ENABLED(CONFIG_OMAP_BUILD_IFT))
> OMAP?
Damn. Removed.
> > + default_environment_path = "/dev/defaultenv";
> > + else
> > + default_environment_path = "/boot/barebox.env";
> > +
> > +out_free:
> > + free(partname);
> > + return 0;
> > +}
> > +late_initcall(socfpga_env_init);
> > +#endif
> > diff --git a/arch/arm/mach-socfpga/include/mach/clkdev.h b/arch/arm/mach-socfpga/include/mach/clkdev.h
> > new file mode 100644
> > index 0000000..04b37a8
> > --- /dev/null
> > +++ b/arch/arm/mach-socfpga/include/mach/clkdev.h
> > @@ -0,0 +1,7 @@
> > +#ifndef __ASM_MACH_CLKDEV_H
> > +#define __ASM_MACH_CLKDEV_H
> > +
> > +#define __clk_get(clk) ({ 1; })
> > +#define __clk_put(clk) do { } while (0)
> > +
> do we still need this?
Nope, removed.
> > +#endif
> > diff --git a/arch/arm/mach-socfpga/include/mach/clock-manager.h b/arch/arm/mach-socfpga/include/mach/clock-manager.h
> > new file mode 100644
> > index 0000000..a2b6975
> > --- /dev/null
>
> > +#if ARRIAV || CYCLONEV
> > + /* av/cv don't have out2 */
> > + scc_mgr_set_dqs_out1_delay(write_group, IO_DQS_OUT_RESERVE);
> > +#else
> > + scc_mgr_set_dqs_out1_delay(write_group, 0);
> > + scc_mgr_set_dqs_out2_delay(write_group, IO_DQS_OUT_RESERVE);
> > +#endif
> really?
What do you mean? I have no idea if the above code is correct, it's
copied from Altera code.
> > + clks[timer] = clk_fixed("timer", 200000000);
> > + clkdev_add_physbase(clks[timer], CYCLONE5_SMP_TWD_ADDRESS, NULL);
> > + add_generic_device("smp_twd", 0, NULL, CYCLONE5_SMP_TWD_ADDRESS, 0x100,
> > + IORESOURCE_MEM, NULL);
> > +}
> > +
> > +static void *socfpga_xload_mmc(void)
> > +{
> > + int ret;
> > + void *buf;
> > + int len;
> > + const char *diskdev = "disk0.1";
> > +
> > + pr_info("loading bootloader from SD/MMC\n");
> > +
> > + ret = mount(diskdev, "fat", "/");
> > + if (ret) {
> > + printf("Unable to mount %s (%d)\n", diskdev, ret);
> > + return NULL;
> > + }
> > +
> > + buf = read_file("/barebox.bin", &len);
> > + if (!buf) {
> > + printf("could not read barebox.bin from sd card\n");
> > + return NULL;
> > + }
> > +
> > + return buf;
> > +}
> please use the generic bootstrap code
Ok
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list