Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fd7ef1f authored by Konrad Eisele's avatar Konrad Eisele Committed by David S. Miller
Browse files

sparc,leon: Introduce the sparc-leon CPU type.



Add sparc_leon enum, M_LEON|M_LEON3_SOC machine. Add compilation of
leon.c in mm and kernel
if CONFIG_SPARC_LEON is defined. Add sparc_leon dependent
initialization to switch statements + head.S.

Signed-off-by: default avatarKonrad Eisele <konrad@gaisler.com>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 97fb58fa
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ struct Sun_Machine_Models {
/* Current number of machines we know about that has an IDPROM
 * machtype entry including one entry for the 0x80 OBP machines.
 */
#define NUM_SUN_MACHINES   15
#define NUM_SUN_MACHINES   16

/* The machine type in the idprom area looks like this:
 *
@@ -30,6 +30,7 @@ struct Sun_Machine_Models {

#define SM_ARCH_MASK  0xf0
#define SM_SUN4       0x20
#define  M_LEON       0x30
#define SM_SUN4C      0x50
#define SM_SUN4M      0x70
#define SM_SUN4M_OBP  0x80
@@ -41,6 +42,9 @@ struct Sun_Machine_Models {
#define SM_4_330      0x03    /* Sun 4/300 series */
#define SM_4_470      0x04    /* Sun 4/400 series */

/* Leon machines */
#define M_LEON3_SOC   0x02    /* Leon3 SoC */

/* Sun4c machines                Full Name              - PROM NAME */
#define SM_4C_SS1     0x01    /* Sun4c SparcStation 1   - Sun 4/60  */
#define SM_4C_IPC     0x02    /* Sun4c SparcStation IPC - Sun 4/40  */
+4 −0
Original line number Diff line number Diff line
@@ -267,6 +267,7 @@ static inline void srmmu_flush_tlb_page(unsigned long page)

}

#ifndef CONFIG_SPARC_LEON
static inline unsigned long srmmu_hwprobe(unsigned long vaddr)
{
	unsigned long retval;
@@ -278,6 +279,9 @@ static inline unsigned long srmmu_hwprobe(unsigned long vaddr)

	return retval;
}
#else
#define srmmu_hwprobe(addr) (srmmu_swprobe(addr, 0) & SRMMU_PTE_PMASK)
#endif

static inline int
srmmu_get_pte (unsigned long addr)
+3 −0
Original line number Diff line number Diff line
@@ -118,5 +118,8 @@ extern struct device_node *of_console_device;
extern char *of_console_path;
extern char *of_console_options;

extern void (*prom_build_more)(struct device_node *dp, struct device_node ***nextp);
extern char *build_full_name(struct device_node *dp);

#endif /* __KERNEL__ */
#endif /* _SPARC_PROM_H */
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ enum sparc_cpu {
  sun4u       = 0x05, /* V8 ploos ploos */
  sun_unknown = 0x06,
  ap1000      = 0x07, /* almost a sun4m */
  sparc_leon  = 0x08, /* Leon SoC */
};

/* Really, userland should not be looking at any of this... */
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ obj-y += of_device_common.o
obj-y                   += of_device_$(BITS).o
obj-$(CONFIG_SPARC64)   += prom_irqtrans.o

obj-$(CONFIG_SPARC_LEON)+= leon_kernel.o

obj-$(CONFIG_SPARC64)   += reboot.o
obj-$(CONFIG_SPARC64)   += sysfs.o
obj-$(CONFIG_SPARC64)   += iommu.o
Loading