Skip to content

Commit

Permalink
MIPS: ath79: utilize the MIPS multi-machine support
Browse files Browse the repository at this point in the history
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1949/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Gabor Juhos authored and Ralf Baechle committed Jan 18, 2011
1 parent 6eae43c commit 0aabf1a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ config ATH79
select CSRC_R4K
select DMA_NONCOHERENT
select IRQ_CPU
select MIPS_MACHINE
select SYS_HAS_CPU_MIPS32_R2
select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
Expand Down
21 changes: 21 additions & 0 deletions arch/mips/ath79/machtypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Atheros AR71XX/AR724X/AR913X machine type definitions
*
* Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/

#ifndef _ATH79_MACHTYPE_H
#define _ATH79_MACHTYPE_H

#include <asm/mips_machine.h>

enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
};

#endif /* _ATH79_MACHTYPE_H */
15 changes: 15 additions & 0 deletions arch/mips/ath79/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
#include <asm/bootinfo.h>
#include <asm/time.h> /* for mips_hpt_frequency */
#include <asm/reboot.h> /* for _machine_{restart,halt} */
#include <asm/mips_machine.h>

#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/ar71xx_regs.h>
#include "common.h"
#include "dev-common.h"
#include "machtypes.h"

#define ATH79_SYS_TYPE_LEN 64

Expand Down Expand Up @@ -184,7 +186,20 @@ static int __init ath79_setup(void)
{
ath79_gpio_init();
ath79_register_uart();

mips_machine_setup();

return 0;
}

arch_initcall(ath79_setup);

static void __init ath79_generic_init(void)
{
/* Nothing to do */
}

MIPS_MACHINE(ATH79_MACH_GENERIC,
"Generic",
"Generic AR71XX/AR724X/AR913X based board",
ath79_generic_init);

0 comments on commit 0aabf1a

Please sign in to comment.