Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/geert/linux-m68k

Pull m68k updates from Geert Uytterhoeven:
 - Zorro bus cleanups and UAPI revival
 - Bootinfo cleanups and UAPI revival
 - Kexec support
 - Memory size reductions and bug fixes for multi-platform kernels
 - Polled interrupt support for Atari EtherNAT, EtherNEC and NetUSBee
 - Machine-specific random_get_entropy()
 - Defconfig updates and cleanups

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (46 commits)
  m68k/mac: Make SCC reset work more reliably
  m68k/irq - Use polled IRQ flag for MFP timer cascaded interrupts
  m68k: Update defconfigs for v3.13-rc1
  m68k/defconfig: Enable EARLY_PRINTK
  m68k/mm: kmap spelling/grammar fixes
  m68k: Convert arch/m68k/kernel/traps.c to pr_*()
  m68k: Convert arch/m68k/mm/fault.c to pr_*()
  m68k/mm: Check for mm != NULL in do_page_fault() debug code
  m68k/defconfig: Disable /sbin/hotplug fork-bomb by default
  m68k/atari: Hide RTC_PORT() macro from rtc-cmos
  m68k/amiga,atari: Fix specifying multiple debug= parameters
  m68k/defconfig: Use ext4 for ext2/ext3 file systems
  m68k: Add support to export bootinfo in procfs
  m68k: Add kexec support
  m68k/mac: Mark Mac IIsi ADB driver BROKEN
  m68k/amiga: Provide mach_random_get_entropy()
  m68k: Add infrastructure for machine-specific random_get_entropy()
  m68k/atari: Call paging_init() before nf_init()
  m68k: Remove superfluous inclusions of <asm/bootinfo.h>
  m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h>
  ...
  • Loading branch information
torvalds committed Jan 20, 2014
2 parents f479c01 + 56931d7 commit 8cf7a16
Show file tree
Hide file tree
Showing 101 changed files with 1,992 additions and 1,155 deletions.
5 changes: 3 additions & 2 deletions Documentation/zorro.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ The treatment of these regions depends on the type of Zorro space:
-------------

linux/include/linux/zorro.h
linux/include/asm-{m68k,ppc}/zorro.h
linux/include/linux/zorro_ids.h
linux/include/uapi/linux/zorro.h
linux/include/uapi/linux/zorro_ids.h
linux/arch/m68k/include/asm/zorro.h
linux/drivers/zorro
/proc/bus/zorro

24 changes: 24 additions & 0 deletions arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,30 @@ config MMU_SUN3
bool
depends on MMU && !MMU_MOTOROLA && !MMU_COLDFIRE

config KEXEC
bool "kexec system call"
depends on M68KCLASSIC
help
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
but it is independent of the system firmware. And like a reboot
you can start any kernel with it, not just Linux.

The name comes from the similarity to the exec system call.

It is an ongoing process to be certain the hardware in a machine
is properly shutdown, so do not be surprised if this code does not
initially work for you. As of this writing the exact hardware
interface is strongly in flux, so no good recommendation can be
made.

config BOOTINFO_PROC
bool "Export bootinfo in procfs"
depends on KEXEC && M68KCLASSIC
help
Say Y to export the bootinfo used to boot the kernel in a
"bootinfo" file in procfs. This is useful with kexec.

menu "Platform setup"

source arch/m68k/Kconfig.cpu
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/amiga/chipram.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void *amiga_chip_alloc_res(unsigned long size, struct resource *res)

atomic_sub(size, &chipavail);
pr_debug("amiga_chip_alloc_res: returning %pR\n", res);
return (void *)ZTWO_VADDR(res->start);
return ZTWO_VADDR(res->start);
}

void amiga_chip_free(void *ptr)
Expand Down
63 changes: 42 additions & 21 deletions arch/m68k/amiga/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <linux/keyboard.h>

#include <asm/bootinfo.h>
#include <asm/bootinfo-amiga.h>
#include <asm/byteorder.h>
#include <asm/setup.h>
#include <asm/pgtable.h>
#include <asm/amigahw.h>
Expand Down Expand Up @@ -140,46 +142,46 @@ static struct resource ram_resource[NUM_MEMINFO];
* Parse an Amiga-specific record in the bootinfo
*/

int amiga_parse_bootinfo(const struct bi_record *record)
int __init amiga_parse_bootinfo(const struct bi_record *record)
{
int unknown = 0;
const unsigned long *data = record->data;
const void *data = record->data;

switch (record->tag) {
switch (be16_to_cpu(record->tag)) {
case BI_AMIGA_MODEL:
amiga_model = *data;
amiga_model = be32_to_cpup(data);
break;

case BI_AMIGA_ECLOCK:
amiga_eclock = *data;
amiga_eclock = be32_to_cpup(data);
break;

case BI_AMIGA_CHIPSET:
amiga_chipset = *data;
amiga_chipset = be32_to_cpup(data);
break;

case BI_AMIGA_CHIP_SIZE:
amiga_chip_size = *(const int *)data;
amiga_chip_size = be32_to_cpup(data);
break;

case BI_AMIGA_VBLANK:
amiga_vblank = *(const unsigned char *)data;
amiga_vblank = *(const __u8 *)data;
break;

case BI_AMIGA_PSFREQ:
amiga_psfreq = *(const unsigned char *)data;
amiga_psfreq = *(const __u8 *)data;
break;

case BI_AMIGA_AUTOCON:
#ifdef CONFIG_ZORRO
if (zorro_num_autocon < ZORRO_NUM_AUTO) {
const struct ConfigDev *cd = (struct ConfigDev *)data;
struct zorro_dev *dev = &zorro_autocon[zorro_num_autocon++];
const struct ConfigDev *cd = data;
struct zorro_dev_init *dev = &zorro_autocon_init[zorro_num_autocon++];
dev->rom = cd->cd_Rom;
dev->slotaddr = cd->cd_SlotAddr;
dev->slotsize = cd->cd_SlotSize;
dev->resource.start = (unsigned long)cd->cd_BoardAddr;
dev->resource.end = dev->resource.start + cd->cd_BoardSize - 1;
dev->slotaddr = be16_to_cpu(cd->cd_SlotAddr);
dev->slotsize = be16_to_cpu(cd->cd_SlotSize);
dev->boardaddr = be32_to_cpu(cd->cd_BoardAddr);
dev->boardsize = be32_to_cpu(cd->cd_BoardSize);
} else
printk("amiga_parse_bootinfo: too many AutoConfig devices\n");
#endif /* CONFIG_ZORRO */
Expand Down Expand Up @@ -358,6 +360,14 @@ static void __init amiga_identify(void)
#undef AMIGAHW_ANNOUNCE
}


static unsigned long amiga_random_get_entropy(void)
{
/* VPOSR/VHPOSR provide at least 17 bits of data changing at 1.79 MHz */
return *(unsigned long *)&amiga_custom.vposr;
}


/*
* Setup the Amiga configuration info
*/
Expand Down Expand Up @@ -395,6 +405,8 @@ void __init config_amiga(void)
mach_heartbeat = amiga_heartbeat;
#endif

mach_random_get_entropy = amiga_random_get_entropy;

/* Fill in the clock value (based on the 700 kHz E-Clock) */
amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */

Expand Down Expand Up @@ -608,6 +620,8 @@ static void amiga_mem_console_write(struct console *co, const char *s,

static int __init amiga_savekmsg_setup(char *arg)
{
bool registered;

if (!MACH_IS_AMIGA || strcmp(arg, "mem"))
return 0;

Expand All @@ -618,14 +632,16 @@ static int __init amiga_savekmsg_setup(char *arg)

/* Just steal the block, the chipram allocator isn't functional yet */
amiga_chip_size -= SAVEKMSG_MAXMEM;
savekmsg = (void *)ZTWO_VADDR(CHIP_PHYSADDR + amiga_chip_size);
savekmsg = ZTWO_VADDR(CHIP_PHYSADDR + amiga_chip_size);
savekmsg->magic1 = SAVEKMSG_MAGIC1;
savekmsg->magic2 = SAVEKMSG_MAGIC2;
savekmsg->magicptr = ZTWO_PADDR(savekmsg);
savekmsg->size = 0;

registered = !!amiga_console_driver.write;
amiga_console_driver.write = amiga_mem_console_write;
register_console(&amiga_console_driver);
if (!registered)
register_console(&amiga_console_driver);
return 0;
}

Expand Down Expand Up @@ -707,11 +723,16 @@ void amiga_serial_gets(struct console *co, char *s, int len)

static int __init amiga_debug_setup(char *arg)
{
if (MACH_IS_AMIGA && !strcmp(arg, "ser")) {
/* no initialization required (?) */
amiga_console_driver.write = amiga_serial_console_write;
bool registered;

if (!MACH_IS_AMIGA || strcmp(arg, "ser"))
return 0;

/* no initialization required (?) */
registered = !!amiga_console_driver.write;
amiga_console_driver.write = amiga_serial_console_write;
if (!registered)
register_console(&amiga_console_driver);
}
return 0;
}

Expand Down
9 changes: 6 additions & 3 deletions arch/m68k/amiga/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <asm/amigahw.h>
#include <asm/amigayle.h>
#include <asm/byteorder.h>


#ifdef CONFIG_ZORRO
Expand Down Expand Up @@ -66,10 +67,12 @@ static int __init z_dev_present(zorro_id id)
{
unsigned int i;

for (i = 0; i < zorro_num_autocon; i++)
if (zorro_autocon[i].rom.er_Manufacturer == ZORRO_MANUF(id) &&
zorro_autocon[i].rom.er_Product == ZORRO_PROD(id))
for (i = 0; i < zorro_num_autocon; i++) {
const struct ExpansionRom *rom = &zorro_autocon_init[i].rom;
if (be16_to_cpu(rom->er_Manufacturer) == ZORRO_MANUF(id) &&
rom->er_Product == ZORRO_PROD(id))
return 1;
}

return 0;
}
Expand Down
26 changes: 14 additions & 12 deletions arch/m68k/apollo/config.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <linux/init.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/mm.h>
Expand All @@ -9,6 +10,8 @@

#include <asm/setup.h>
#include <asm/bootinfo.h>
#include <asm/bootinfo-apollo.h>
#include <asm/byteorder.h>
#include <asm/pgtable.h>
#include <asm/apollohw.h>
#include <asm/irq.h>
Expand Down Expand Up @@ -43,26 +46,25 @@ static const char *apollo_models[] = {
[APOLLO_DN4500-APOLLO_DN3000] = "DN4500 (Roadrunner)"
};

int apollo_parse_bootinfo(const struct bi_record *record) {

int __init apollo_parse_bootinfo(const struct bi_record *record)
{
int unknown = 0;
const unsigned long *data = record->data;
const void *data = record->data;

switch(record->tag) {
case BI_APOLLO_MODEL:
apollo_model=*data;
break;
switch (be16_to_cpu(record->tag)) {
case BI_APOLLO_MODEL:
apollo_model = be32_to_cpup(data);
break;

default:
unknown=1;
default:
unknown=1;
}

return unknown;
}

void dn_setup_model(void) {


static void __init dn_setup_model(void)
{
printk("Apollo hardware found: ");
printk("[%s]\n", apollo_models[apollo_model - APOLLO_DN3000]);

Expand Down
3 changes: 3 additions & 0 deletions arch/m68k/atari/ataints.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ void __init atari_init_IRQ(void)
m68k_setup_irq_controller(&atari_mfptimer_chip, handle_simple_irq,
IRQ_MFP_TIMER1, 8);

irq_set_status_flags(IRQ_MFP_TIMER1, IRQ_IS_POLLED);
irq_set_status_flags(IRQ_MFP_TIMER2, IRQ_IS_POLLED);

/* prepare timer D data for use as poll interrupt */
/* set Timer D data Register - needs to be > 0 */
st_mfp.tim_dt_d = 254; /* < 100 Hz */
Expand Down
10 changes: 6 additions & 4 deletions arch/m68k/atari/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#include <linux/module.h>

#include <asm/bootinfo.h>
#include <asm/bootinfo-atari.h>
#include <asm/byteorder.h>
#include <asm/setup.h>
#include <asm/atarihw.h>
#include <asm/atariints.h>
Expand Down Expand Up @@ -129,14 +131,14 @@ static int __init scc_test(volatile char *ctla)
int __init atari_parse_bootinfo(const struct bi_record *record)
{
int unknown = 0;
const u_long *data = record->data;
const void *data = record->data;

switch (record->tag) {
switch (be16_to_cpu(record->tag)) {
case BI_ATARI_MCH_COOKIE:
atari_mch_cookie = *data;
atari_mch_cookie = be32_to_cpup(data);
break;
case BI_ATARI_MCH_TYPE:
atari_mch_type = *data;
atari_mch_type = be32_to_cpup(data);
break;
default:
unknown = 1;
Expand Down
5 changes: 4 additions & 1 deletion arch/m68k/atari/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,16 @@ static void __init atari_init_midi_port(int cflag)

static int __init atari_debug_setup(char *arg)
{
bool registered;

if (!MACH_IS_ATARI)
return 0;

if (!strcmp(arg, "ser"))
/* defaults to ser2 for a Falcon and ser1 otherwise */
arg = MACH_IS_FALCON ? "ser2" : "ser1";

registered = !!atari_console_driver.write;
if (!strcmp(arg, "ser1")) {
/* ST-MFP Modem1 serial port */
atari_init_mfp_port(B9600|CS8);
Expand All @@ -317,7 +320,7 @@ static int __init atari_debug_setup(char *arg)
sound_ym.wd_data = sound_ym.rd_data_reg_sel | 0x20; /* strobe H */
atari_console_driver.write = atari_par_console_write;
}
if (atari_console_driver.write)
if (atari_console_driver.write && !registered)
register_console(&atari_console_driver);

return 0;
Expand Down
6 changes: 4 additions & 2 deletions arch/m68k/bvme6000/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <linux/bcd.h>

#include <asm/bootinfo.h>
#include <asm/bootinfo-vme.h>
#include <asm/byteorder.h>
#include <asm/pgtable.h>
#include <asm/setup.h>
#include <asm/irq.h>
Expand All @@ -50,9 +52,9 @@ void bvme6000_set_vectors (void);
static irq_handler_t tick_handler;


int bvme6000_parse_bootinfo(const struct bi_record *bi)
int __init bvme6000_parse_bootinfo(const struct bi_record *bi)
{
if (bi->tag == BI_VME_TYPE)
if (be16_to_cpu(bi->tag) == BI_VME_TYPE)
return 0;
else
return 1;
Expand Down
Loading

0 comments on commit 8cf7a16

Please sign in to comment.