socsvn commit: r237015 - in soc2012/aleek/beaglexm-armv6/sys/arm:
arm ti ti/omap3
aleek at FreeBSD.org
aleek at FreeBSD.org
Sun Jun 3 19:23:05 UTC 2012
Author: aleek
Date: Sun Jun 3 19:23:02 2012
New Revision: 237015
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=237015
Log:
beagle early puts
Modified:
soc2012/aleek/beaglexm-armv6/sys/arm/arm/locore.S
soc2012/aleek/beaglexm-armv6/sys/arm/ti/omap3/files.omap3
soc2012/aleek/beaglexm-armv6/sys/arm/ti/omap3/omap3var.h
soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c
Modified: soc2012/aleek/beaglexm-armv6/sys/arm/arm/locore.S
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/arm/locore.S Sun Jun 3 18:34:32 2012 (r237014)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/arm/locore.S Sun Jun 3 19:23:02 2012 (r237015)
@@ -246,6 +246,8 @@
MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW))
MMU_INIT(0x48000000, 0x48000000, 1, L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW))
#endif
+ /*MMU_INIT(0x49020000, 0x49020000, 1, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW))*/
+ MMU_INIT(0x49000000, 0x49000000, 1, L1_TYPE_S|L1_S_AP(AP_KRW))
.word 0 /* end of table */
#endif
.Lstart:
Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/omap3/files.omap3
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/omap3/files.omap3 Sun Jun 3 18:34:32 2012 (r237014)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/omap3/files.omap3 Sun Jun 3 19:23:02 2012 (r237015)
@@ -1,3 +1,5 @@
#$FreeBSD$
arm/ti/omap3/omap3_intr.c standard
+arm/ti/omap3/omap35x.c standard
+arm/ti/omap3/omap3_prcm_clks.c standard
Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/omap3/omap3var.h
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/omap3/omap3var.h Sun Jun 3 18:34:32 2012 (r237014)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/omap3/omap3var.h Sun Jun 3 19:23:02 2012 (r237015)
@@ -45,6 +45,7 @@
#include <machine/resource.h>
#include <machine/intr.h>
+#include <arm/ti/ti_cpuid.h>
/*
* Random collection of functions and definitions ... needs cleanup
@@ -82,6 +83,111 @@
omap3_padconf_init(device_t dev, int prio);
+/*
+ * Random collection of functions and definitions ... needs cleanup
+ *
+ *
+ *
+ */
+
+
+extern struct bus_space omap_bs_tag;
+
+unsigned int
+omap_sdram_size(void);
+
+void
+omap_mask_all_intr(void);
+
+void
+omap_post_filter_intr(void *arg);
+
+int
+omap_setup_intr(device_t dev, device_t child,
+ struct resource *res, int flags, driver_filter_t *filt,
+ driver_intr_t *intr, void *arg, void **cookiep);
+
+int
+omap_teardown_intr(device_t dev, device_t child, struct resource *res,
+ void *cookie);
+
+
+
+/**
+ * OMAP Device IDs
+ *
+ * These values are typically read out of the ID_CODE register, located at
+ * physical address 0x4A00 2204 on most OMAP devices
+ */
+#define OMAP_CPUID_OMAP3530 0x0C00
+#define OMAP_CPUID_OMAP3525 0x4C00
+#define OMAP_CPUID_OMAP3515 0x1C00
+#define OMAP_CPUID_OMAP3503 0x5C00
+
+#define OMAP_CPUID_OMAP4430_ES1_2 0xB852
+#define OMAP_CPUID_OMAP4430 0xB95C
+
+
+
+
+/**
+ * struct omap_softc
+ *
+ *
+ *
+ */
+extern uint32_t omap3_chip_id;
+
+static inline int
+omap_cpu_is(uint32_t cpu)
+{
+ return ((omap3_chip_id & 0xffff) == cpu);
+}
+
+
+/**
+ * struct omap_softc
+ *
+ *
+ *
+ */
+struct omap_softc {
+ device_t sc_dev;
+ bus_space_tag_t sc_iotag;
+ bus_space_handle_t sc_ioh;
+
+ struct rman sc_irq_rman;
+ struct rman sc_mem_rman;
+ bus_dma_tag_t sc_dmat;
+};
+
+
+struct omap_mem_range {
+ bus_addr_t base;
+ bus_size_t size;
+};
+
+/**
+ * struct omap_cpu_dev
+ *
+ * Structure used to define all the SoC devices, it allows for two memory
+ * address ranges and 4 IRQ's per device.
+ *
+ */
+struct omap_cpu_dev {
+ const char *name;
+ int unit;
+
+ struct omap_mem_range mem[16];
+ int irqs[16];
+};
+
+
+
+struct omap_ivar {
+ struct resource_list resources;
+};
+
#endif /* _OMAP3VAR_H_ */
Modified: soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c
==============================================================================
--- soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c Sun Jun 3 18:34:32 2012 (r237014)
+++ soc2012/aleek/beaglexm-armv6/sys/arm/ti/ti_machdep.c Sun Jun 3 19:23:02 2012 (r237015)
@@ -299,6 +299,31 @@
phys_avail[j + 1] = 0;
}
+void
+beagle_early_puts(char *s);
+
+void
+beagle_early_puts(char *s)
+{
+ // 0xFFFFEE00
+ volatile uint32_t *uart = (volatile uint32_t *)0x49020000;
+ volatile uint32_t *uart_lsr = (volatile uint32_t *)0x49020014;
+ while (*s)
+ {
+ while ((*uart_lsr & 0x60) == 0);
+ *uart = *s;
+
+ if (*s == '\n')
+ {
+ while ((*uart_lsr & 0x60) == 0);
+ *uart = '\r';
+ }
+ *s++;
+ }
+}
+
+
+
void *
initarm(void *mdp, void *unused __unused)
{
@@ -310,12 +335,18 @@
u_int l1pagetable;
int i = 0, j = 0;
+
+ beagle_early_puts( "BeagleBoard-XM revC FreeBSD hababababa booting...\n" );
+
kmdp = NULL;
lastaddr = 0;
memsize = 0;
dtbp = (vm_offset_t)NULL;
+
+ beagle_early_puts( "set_cpufuncs()..." );
set_cpufuncs();
+ beagle_early_puts( "done!\n" );
/*
* Mask metadata pointer: it is supposed to be on page boundary. If
More information about the svn-soc-all
mailing list