Remove some warnings from the tyan s2895.
Declare superio functions to be static and remove duplicates. Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4890 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
8f6354b6d3
commit
7943fe61df
|
@ -501,21 +501,21 @@ static int load_self_segments(
|
||||||
memset(middle, 0, end - middle);
|
memset(middle, 0, end - middle);
|
||||||
}
|
}
|
||||||
/* Copy the data that's outside the area that shadows coreboot_ram */
|
/* Copy the data that's outside the area that shadows coreboot_ram */
|
||||||
printk_debug("dest %lx, end %lx, bouncebuffer %lx\n", dest, end, bounce_buffer);
|
printk_debug("dest %p, end %p, bouncebuffer %lx\n", dest, end, bounce_buffer);
|
||||||
if ((unsigned long)end > bounce_buffer) {
|
if ((unsigned long)end > bounce_buffer) {
|
||||||
if ((unsigned long)dest < bounce_buffer) {
|
if ((unsigned long)dest < bounce_buffer) {
|
||||||
unsigned long from = dest;
|
unsigned char *from = dest;
|
||||||
unsigned long to = lb_start-(bounce_buffer-(unsigned long)dest);
|
unsigned char *to = (unsigned char*)(lb_start-(bounce_buffer-(unsigned long)dest));
|
||||||
unsigned long amount = bounce_buffer-(unsigned long)dest;
|
unsigned long amount = bounce_buffer-(unsigned long)dest;
|
||||||
printk_debug("move prefix around: from %lx, to %lx, amount: %lx\n", from, to, amount);
|
printk_debug("move prefix around: from %p, to %p, amount: %lx\n", from, to, amount);
|
||||||
memcpy(to, from, amount);
|
memcpy(to, from, amount);
|
||||||
}
|
}
|
||||||
if ((unsigned long)end > bounce_buffer + (lb_end - lb_start)) {
|
if ((unsigned long)end > bounce_buffer + (lb_end - lb_start)) {
|
||||||
unsigned long from = bounce_buffer + (lb_end - lb_start);
|
unsigned long from = bounce_buffer + (lb_end - lb_start);
|
||||||
unsigned long to = lb_end;
|
unsigned long to = lb_end;
|
||||||
unsigned long amount = end - from;
|
unsigned long amount = (unsigned long)end - from;
|
||||||
printk_debug("move suffix around: from %lx, to %lx, amount: %lx\n", from, to, amount);
|
printk_debug("move suffix around: from %lx, to %lx, amount: %lx\n", from, to, amount);
|
||||||
memcpy(to, from, amount);
|
memcpy((char*)to, (char*)from, amount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <cpu/x86/msr.h>
|
#include <cpu/x86/msr.h>
|
||||||
#include <cpu/cpu.h>
|
#include <cpu/cpu.h>
|
||||||
|
#include <cpu/amd/model_10xxx_rev.h>
|
||||||
|
|
||||||
extern void wrmsr_amd(u32 index, msr_t msr);
|
extern void wrmsr_amd(u32 index, msr_t msr);
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#include <cpu/amd/model_fxx_msr.h>
|
#include <cpu/amd/model_fxx_msr.h>
|
||||||
|
|
||||||
|
#if CONFIG_WAIT_BEFORE_CPUS_INIT
|
||||||
void cpus_ready_for_init(void)
|
void cpus_ready_for_init(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_MEM_TRAIN_SEQ == 1
|
#if CONFIG_MEM_TRAIN_SEQ == 1
|
||||||
|
@ -38,7 +39,7 @@ void cpus_ready_for_init(void)
|
||||||
wait_all_core0_mem_trained(sysinfox);
|
wait_all_core0_mem_trained(sysinfox);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CONFIG_K8_REV_F_SUPPORT == 0
|
#if CONFIG_K8_REV_F_SUPPORT == 0
|
||||||
int is_e0_later_in_bsp(int nodeid)
|
int is_e0_later_in_bsp(int nodeid)
|
||||||
|
@ -463,13 +464,12 @@ static inline void k8_errata(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void model_fxx_update_microcode(unsigned cpu_deviceid);
|
extern void model_fxx_update_microcode(unsigned cpu_deviceid);
|
||||||
int init_processor_name(void);
|
|
||||||
|
|
||||||
#if CONFIG_USBDEBUG_DIRECT
|
#if CONFIG_USBDEBUG_DIRECT
|
||||||
static unsigned ehci_debug_addr;
|
static unsigned ehci_debug_addr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void model_fxx_init(device_t dev)
|
static void model_fxx_init(device_t dev)
|
||||||
{
|
{
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
msr_t msr;
|
msr_t msr;
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <cpu/x86/msr.h>
|
#include <cpu/x86/msr.h>
|
||||||
|
#include <cpu/amd/model_fxx_rev.h>
|
||||||
|
|
||||||
/* The maximum length of CPU names is 48 bytes, including the final NULL byte.
|
/* The maximum length of CPU names is 48 bytes, including the final NULL byte.
|
||||||
* If you change these names your BIOS will _NOT_ pass the AMD validation and
|
* If you change these names your BIOS will _NOT_ pass the AMD validation and
|
||||||
|
@ -110,39 +111,6 @@ static inline void wrmsr_amd(unsigned index, msr_t msr)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned int cpuid_eax(unsigned int op)
|
|
||||||
{
|
|
||||||
unsigned int eax;
|
|
||||||
|
|
||||||
__asm__("cpuid"
|
|
||||||
: "=a" (eax)
|
|
||||||
: "0" (op)
|
|
||||||
: "ebx", "ecx", "edx");
|
|
||||||
return eax;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline unsigned int cpuid_ebx(unsigned int op)
|
|
||||||
{
|
|
||||||
unsigned int eax, ebx;
|
|
||||||
|
|
||||||
__asm__("cpuid"
|
|
||||||
: "=a" (eax), "=b" (ebx)
|
|
||||||
: "0" (op)
|
|
||||||
: "ecx", "edx" );
|
|
||||||
return ebx;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline unsigned int cpuid_ecx(unsigned int op)
|
|
||||||
{
|
|
||||||
unsigned int eax, ecx;
|
|
||||||
|
|
||||||
__asm__("cpuid"
|
|
||||||
: "=a" (eax), "=c" (ecx)
|
|
||||||
: "0" (op)
|
|
||||||
: "ebx", "edx" );
|
|
||||||
return ecx;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void strcpy(char *dst, const char *src)
|
static inline void strcpy(char *dst, const char *src)
|
||||||
{
|
{
|
||||||
while (*src) *dst++ = *src++;
|
while (*src) *dst++ = *src++;
|
||||||
|
|
|
@ -448,16 +448,6 @@ static void wait_other_cpus_stop(struct bus *cpu_bus)
|
||||||
#define initialize_other_cpus(root) do {} while(0)
|
#define initialize_other_cpus(root) do {} while(0)
|
||||||
#endif /* CONFIG_SMP */
|
#endif /* CONFIG_SMP */
|
||||||
|
|
||||||
#if CONFIG_WAIT_BEFORE_CPUS_INIT==0
|
|
||||||
#define cpus_ready_for_init() do {} while(0)
|
|
||||||
#else
|
|
||||||
void cpus_ready_for_init(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_HAVE_SMI_HANDLER
|
|
||||||
void smm_init(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void initialize_cpus(struct bus *cpu_bus)
|
void initialize_cpus(struct bus *cpu_bus)
|
||||||
{
|
{
|
||||||
struct device_path cpu_path;
|
struct device_path cpu_path;
|
||||||
|
|
|
@ -613,7 +613,7 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
|
||||||
*
|
*
|
||||||
* @return The maximum bus number found, after scanning all subordinate busses
|
* @return The maximum bus number found, after scanning all subordinate busses
|
||||||
*/
|
*/
|
||||||
unsigned int hypertransport_scan_chain_x(struct bus *bus,
|
static unsigned int hypertransport_scan_chain_x(struct bus *bus,
|
||||||
unsigned min_devfn, unsigned max_devfn, unsigned int max)
|
unsigned min_devfn, unsigned max_devfn, unsigned int max)
|
||||||
{
|
{
|
||||||
unsigned ht_unitid_base[4];
|
unsigned ht_unitid_base[4];
|
||||||
|
|
|
@ -19,4 +19,6 @@
|
||||||
|
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
|
int init_processor_name(void);
|
||||||
|
|
||||||
/* place holder for Family 10 revision code */
|
/* place holder for Family 10 revision code */
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
|
int init_processor_name(void);
|
||||||
|
|
||||||
#if CONFIG_K8_REV_F_SUPPORT == 0
|
#if CONFIG_K8_REV_F_SUPPORT == 0
|
||||||
static inline int is_cpu_rev_a0(void)
|
static inline int is_cpu_rev_a0(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,6 +7,17 @@ struct bus;
|
||||||
|
|
||||||
void cpu_initialize(void);
|
void cpu_initialize(void);
|
||||||
void initialize_cpus(struct bus *cpu_bus);
|
void initialize_cpus(struct bus *cpu_bus);
|
||||||
|
void secondary_cpu_init(void);
|
||||||
|
|
||||||
|
#if CONFIG_WAIT_BEFORE_CPUS_INIT==0
|
||||||
|
#define cpus_ready_for_init() do {} while(0)
|
||||||
|
#else
|
||||||
|
void cpus_ready_for_init(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_HAVE_SMI_HANDLER
|
||||||
|
void smm_init(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __cpu_driver __attribute__ ((used,__section__(".rodata.cpu_driver")))
|
#define __cpu_driver __attribute__ ((used,__section__(".rodata.cpu_driver")))
|
||||||
/** start of compile time generated pci driver array */
|
/** start of compile time generated pci driver array */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#ifndef DELAY_H
|
#ifndef DELAY_H
|
||||||
#define DELAY_H
|
#define DELAY_H
|
||||||
#if !defined( __ROMCC__) && defined (__GNUC__)
|
#if !defined( __ROMCC__)
|
||||||
|
|
||||||
void udelay(unsigned usecs);
|
void udelay(unsigned usecs);
|
||||||
void mdelay(unsigned msecs);
|
void mdelay(unsigned msecs);
|
||||||
|
|
|
@ -82,7 +82,7 @@ struct acpi_srat_mem_state {
|
||||||
unsigned long current;
|
unsigned long current;
|
||||||
};
|
};
|
||||||
|
|
||||||
void set_srat_mem(void *gp, struct device *dev, struct resource *res)
|
static void set_srat_mem(void *gp, struct device *dev, struct resource *res)
|
||||||
{
|
{
|
||||||
struct acpi_srat_mem_state *state = gp;
|
struct acpi_srat_mem_state *state = gp;
|
||||||
unsigned long basek, sizek;
|
unsigned long basek, sizek;
|
||||||
|
|
|
@ -45,6 +45,7 @@ acknowledgement of AMD's proprietary rights in them.
|
||||||
#include <cpu/x86/msr.h>
|
#include <cpu/x86/msr.h>
|
||||||
#include <cpu/amd/mtrr.h>
|
#include <cpu/amd/mtrr.h>
|
||||||
#include <cpu/amd/amdk8_sysconf.h>
|
#include <cpu/amd/amdk8_sysconf.h>
|
||||||
|
#include "amdk8_acpi.h"
|
||||||
|
|
||||||
//it seems some functions can be moved arch/i386/boot/acpi.c
|
//it seems some functions can be moved arch/i386/boot/acpi.c
|
||||||
|
|
||||||
|
@ -102,7 +103,7 @@ struct acpi_srat_mem_state {
|
||||||
unsigned long current;
|
unsigned long current;
|
||||||
};
|
};
|
||||||
|
|
||||||
void set_srat_mem(void *gp, struct device *dev, struct resource *res)
|
static void set_srat_mem(void *gp, struct device *dev, struct resource *res)
|
||||||
{
|
{
|
||||||
struct acpi_srat_mem_state *state = gp;
|
struct acpi_srat_mem_state *state = gp;
|
||||||
unsigned long basek, sizek;
|
unsigned long basek, sizek;
|
||||||
|
|
|
@ -1080,7 +1080,7 @@ static unsigned long order_chip_selects(const struct mem_controller *ctrl)
|
||||||
return (tom & ~0xff000000) << 15;
|
return (tom & ~0xff000000) << 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long memory_end_k(const struct mem_controller *ctrl, int max_node_id)
|
static unsigned long memory_end_k(const struct mem_controller *ctrl, int max_node_id)
|
||||||
{
|
{
|
||||||
unsigned node_id;
|
unsigned node_id;
|
||||||
unsigned end_k;
|
unsigned end_k;
|
||||||
|
|
|
@ -1253,7 +1253,7 @@ static unsigned long order_chip_selects(const struct mem_controller *ctrl)
|
||||||
return (tom & ~0xff000000) << (27-10);
|
return (tom & ~0xff000000) << (27-10);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long memory_end_k(const struct mem_controller *ctrl, int max_node_id)
|
static unsigned long memory_end_k(const struct mem_controller *ctrl, int max_node_id)
|
||||||
{
|
{
|
||||||
unsigned node_id;
|
unsigned node_id;
|
||||||
unsigned end_k;
|
unsigned end_k;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
#include <part/hard_reset.h>
|
||||||
|
|
||||||
#define PCI_DEV(BUS, DEV, FN) ( \
|
#define PCI_DEV(BUS, DEV, FN) ( \
|
||||||
(((BUS) & 0xFFF) << 20) | \
|
(((BUS) & 0xFFF) << 20) | \
|
||||||
|
|
|
@ -60,21 +60,21 @@ static void f71805f_init(device_t dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void f71805f_pnp_set_resources(device_t dev)
|
static void f71805f_pnp_set_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_set_resources(dev);
|
pnp_set_resources(dev);
|
||||||
pnp_exit_conf_state(dev);
|
pnp_exit_conf_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void f71805f_pnp_enable_resources(device_t dev)
|
static void f71805f_pnp_enable_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
pnp_exit_conf_state(dev);
|
pnp_exit_conf_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void f71805f_pnp_enable(device_t dev)
|
static void f71805f_pnp_enable(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
|
|
|
@ -38,10 +38,9 @@
|
||||||
|
|
||||||
// Forward declarations
|
// Forward declarations
|
||||||
static void enable_dev(device_t dev);
|
static void enable_dev(device_t dev);
|
||||||
void lpc47b272_pnp_set_resources(device_t dev);
|
static void lpc47b272_pnp_set_resources(device_t dev);
|
||||||
void lpc47b272_pnp_set_resources(device_t dev);
|
static void lpc47b272_pnp_enable_resources(device_t dev);
|
||||||
void lpc47b272_pnp_enable_resources(device_t dev);
|
static void lpc47b272_pnp_enable(device_t dev);
|
||||||
void lpc47b272_pnp_enable(device_t dev);
|
|
||||||
static void lpc47b272_init(device_t dev);
|
static void lpc47b272_init(device_t dev);
|
||||||
|
|
||||||
static void pnp_enter_conf_state(device_t dev);
|
static void pnp_enter_conf_state(device_t dev);
|
||||||
|
@ -96,21 +95,21 @@ static void enable_dev(device_t dev)
|
||||||
// Description: Configure the specified Super I/O device with the resources
|
// Description: Configure the specified Super I/O device with the resources
|
||||||
// (I/O space, etc.) that have been allocated for it.
|
// (I/O space, etc.) that have been allocated for it.
|
||||||
//
|
//
|
||||||
void lpc47b272_pnp_set_resources(device_t dev)
|
static void lpc47b272_pnp_set_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_set_resources(dev);
|
pnp_set_resources(dev);
|
||||||
pnp_exit_conf_state(dev);
|
pnp_exit_conf_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47b272_pnp_enable_resources(device_t dev)
|
static void lpc47b272_pnp_enable_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
pnp_exit_conf_state(dev);
|
pnp_exit_conf_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47b272_pnp_enable(device_t dev)
|
static void lpc47b272_pnp_enable(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
|
|
|
@ -74,7 +74,7 @@ static void lpc47b397_init(device_t dev)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47b397_pnp_set_resources(device_t dev)
|
static void lpc47b397_pnp_set_resources(device_t dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
|
@ -89,7 +89,7 @@ void lpc47b397_pnp_set_resources(device_t dev)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47b397_pnp_enable_resources(device_t dev)
|
static void lpc47b397_pnp_enable_resources(device_t dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
|
@ -112,7 +112,7 @@ void lpc47b397_pnp_enable_resources(device_t dev)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47b397_pnp_enable(device_t dev)
|
static void lpc47b397_pnp_enable(device_t dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
|
|
|
@ -37,10 +37,9 @@
|
||||||
|
|
||||||
// Forward declarations
|
// Forward declarations
|
||||||
static void enable_dev(device_t dev);
|
static void enable_dev(device_t dev);
|
||||||
void lpc47m10x_pnp_set_resources(device_t dev);
|
static void lpc47m10x_pnp_set_resources(device_t dev);
|
||||||
void lpc47m10x_pnp_set_resources(device_t dev);
|
static void lpc47m10x_pnp_enable_resources(device_t dev);
|
||||||
void lpc47m10x_pnp_enable_resources(device_t dev);
|
static void lpc47m10x_pnp_enable(device_t dev);
|
||||||
void lpc47m10x_pnp_enable(device_t dev);
|
|
||||||
static void lpc47m10x_init(device_t dev);
|
static void lpc47m10x_init(device_t dev);
|
||||||
|
|
||||||
static void pnp_enter_conf_state(device_t dev);
|
static void pnp_enter_conf_state(device_t dev);
|
||||||
|
@ -94,21 +93,21 @@ static void enable_dev(device_t dev)
|
||||||
// Description: Configure the specified Super I/O device with the resources
|
// Description: Configure the specified Super I/O device with the resources
|
||||||
// (I/O space, etc.) that have been allocated for it.
|
// (I/O space, etc.) that have been allocated for it.
|
||||||
//
|
//
|
||||||
void lpc47m10x_pnp_set_resources(device_t dev)
|
static void lpc47m10x_pnp_set_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_set_resources(dev);
|
pnp_set_resources(dev);
|
||||||
pnp_exit_conf_state(dev);
|
pnp_exit_conf_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47m10x_pnp_enable_resources(device_t dev)
|
static void lpc47m10x_pnp_enable_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
pnp_exit_conf_state(dev);
|
pnp_exit_conf_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47m10x_pnp_enable(device_t dev)
|
static void lpc47m10x_pnp_enable(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
|
|
|
@ -34,9 +34,9 @@
|
||||||
|
|
||||||
// Forward declarations
|
// Forward declarations
|
||||||
static void enable_dev(device_t dev);
|
static void enable_dev(device_t dev);
|
||||||
void lpc47m15x_pnp_set_resources(device_t dev);
|
static void lpc47m15x_pnp_set_resources(device_t dev);
|
||||||
void lpc47m15x_pnp_enable_resources(device_t dev);
|
static void lpc47m15x_pnp_enable_resources(device_t dev);
|
||||||
void lpc47m15x_pnp_enable(device_t dev);
|
static void lpc47m15x_pnp_enable(device_t dev);
|
||||||
static void lpc47m15x_init(device_t dev);
|
static void lpc47m15x_init(device_t dev);
|
||||||
|
|
||||||
static void pnp_enter_conf_state(device_t dev);
|
static void pnp_enter_conf_state(device_t dev);
|
||||||
|
@ -70,21 +70,21 @@ static void enable_dev(device_t dev)
|
||||||
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47m15x_pnp_set_resources(device_t dev)
|
static void lpc47m15x_pnp_set_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_set_resources(dev);
|
pnp_set_resources(dev);
|
||||||
pnp_exit_conf_state(dev);
|
pnp_exit_conf_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47m15x_pnp_enable_resources(device_t dev)
|
static void lpc47m15x_pnp_enable_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
pnp_exit_conf_state(dev);
|
pnp_exit_conf_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47m15x_pnp_enable(device_t dev)
|
static void lpc47m15x_pnp_enable(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
pnp_set_logical_device(dev);
|
pnp_set_logical_device(dev);
|
||||||
|
|
|
@ -39,16 +39,16 @@
|
||||||
|
|
||||||
// Forward declarations
|
// Forward declarations
|
||||||
static void enable_dev(device_t dev);
|
static void enable_dev(device_t dev);
|
||||||
void lpc47n217_pnp_set_resources(device_t dev);
|
static void lpc47n217_pnp_set_resources(device_t dev);
|
||||||
void lpc47n217_pnp_enable_resources(device_t dev);
|
static void lpc47n217_pnp_enable_resources(device_t dev);
|
||||||
void lpc47n217_pnp_enable(device_t dev);
|
static void lpc47n217_pnp_enable(device_t dev);
|
||||||
static void lpc47n217_init(device_t dev);
|
static void lpc47n217_init(device_t dev);
|
||||||
|
|
||||||
static void lpc47n217_pnp_set_resource(device_t dev, struct resource *resource);
|
static void lpc47n217_pnp_set_resource(device_t dev, struct resource *resource);
|
||||||
void lpc47n217_pnp_set_iobase(device_t dev, unsigned iobase);
|
static void lpc47n217_pnp_set_iobase(device_t dev, unsigned iobase);
|
||||||
void lpc47n217_pnp_set_drq(device_t dev, unsigned drq);
|
static void lpc47n217_pnp_set_drq(device_t dev, unsigned drq);
|
||||||
void lpc47n217_pnp_set_irq(device_t dev, unsigned irq);
|
static void lpc47n217_pnp_set_irq(device_t dev, unsigned irq);
|
||||||
void lpc47n217_pnp_set_enable(device_t dev, int enable);
|
static void lpc47n217_pnp_set_enable(device_t dev, int enable);
|
||||||
|
|
||||||
static void pnp_enter_conf_state(device_t dev);
|
static void pnp_enter_conf_state(device_t dev);
|
||||||
static void pnp_exit_conf_state(device_t dev);
|
static void pnp_exit_conf_state(device_t dev);
|
||||||
|
@ -98,7 +98,7 @@ static void enable_dev(device_t dev)
|
||||||
// Description: Configure the specified Super I/O device with the resources
|
// Description: Configure the specified Super I/O device with the resources
|
||||||
// (I/O space, etc.) that have been allocate for it.
|
// (I/O space, etc.) that have been allocate for it.
|
||||||
//
|
//
|
||||||
void lpc47n217_pnp_set_resources(device_t dev)
|
static void lpc47n217_pnp_set_resources(device_t dev)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ void lpc47n217_pnp_set_resources(device_t dev)
|
||||||
pnp_exit_conf_state(dev);
|
pnp_exit_conf_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47n217_pnp_enable_resources(device_t dev)
|
static void lpc47n217_pnp_enable_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ void lpc47n217_pnp_enable_resources(device_t dev)
|
||||||
pnp_exit_conf_state(dev);
|
pnp_exit_conf_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47n217_pnp_enable(device_t dev)
|
static void lpc47n217_pnp_enable(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_conf_state(dev);
|
pnp_enter_conf_state(dev);
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ static void lpc47n217_pnp_set_resource(device_t dev, struct resource *resource)
|
||||||
report_resource_stored(dev, resource, "");
|
report_resource_stored(dev, resource, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47n217_pnp_set_iobase(device_t dev, unsigned iobase)
|
static void lpc47n217_pnp_set_iobase(device_t dev, unsigned iobase)
|
||||||
{
|
{
|
||||||
ASSERT(!(iobase & 0x3));
|
ASSERT(!(iobase & 0x3));
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ void lpc47n217_pnp_set_iobase(device_t dev, unsigned iobase)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47n217_pnp_set_drq(device_t dev, unsigned drq)
|
static void lpc47n217_pnp_set_drq(device_t dev, unsigned drq)
|
||||||
{
|
{
|
||||||
if (dev->path.pnp.device == LPC47N217_PP) {
|
if (dev->path.pnp.device == LPC47N217_PP) {
|
||||||
const uint8_t PP_DMA_MASK = 0x0F;
|
const uint8_t PP_DMA_MASK = 0x0F;
|
||||||
|
@ -246,7 +246,7 @@ void lpc47n217_pnp_set_drq(device_t dev, unsigned drq)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47n217_pnp_set_irq(device_t dev, unsigned irq)
|
static void lpc47n217_pnp_set_irq(device_t dev, unsigned irq)
|
||||||
{
|
{
|
||||||
uint8_t irq_config_register = 0;
|
uint8_t irq_config_register = 0;
|
||||||
uint8_t irq_config_mask = 0;
|
uint8_t irq_config_mask = 0;
|
||||||
|
@ -282,7 +282,7 @@ void lpc47n217_pnp_set_irq(device_t dev, unsigned irq)
|
||||||
pnp_write_config(dev, irq_config_register, new_config);
|
pnp_write_config(dev, irq_config_register, new_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpc47n217_pnp_set_enable(device_t dev, int enable)
|
static void lpc47n217_pnp_set_enable(device_t dev, int enable)
|
||||||
{
|
{
|
||||||
uint8_t power_register = 0;
|
uint8_t power_register = 0;
|
||||||
uint8_t power_mask = 0;
|
uint8_t power_mask = 0;
|
||||||
|
|
|
@ -64,21 +64,21 @@ static void w83627dhg_init(device_t dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void w83627dhg_pnp_set_resources(device_t dev)
|
static void w83627dhg_pnp_set_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_ext_func_mode(dev);
|
pnp_enter_ext_func_mode(dev);
|
||||||
pnp_set_resources(dev);
|
pnp_set_resources(dev);
|
||||||
pnp_exit_ext_func_mode(dev);
|
pnp_exit_ext_func_mode(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void w83627dhg_pnp_enable_resources(device_t dev)
|
static void w83627dhg_pnp_enable_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_ext_func_mode(dev);
|
pnp_enter_ext_func_mode(dev);
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
pnp_exit_ext_func_mode(dev);
|
pnp_exit_ext_func_mode(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void w83627dhg_pnp_enable(device_t dev)
|
static void w83627dhg_pnp_enable(device_t dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled)
|
if (!dev->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -137,14 +137,14 @@ static void w83627ehg_init(device_t dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void w83627ehg_pnp_set_resources(device_t dev)
|
static void w83627ehg_pnp_set_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_ext_func_mode(dev);
|
pnp_enter_ext_func_mode(dev);
|
||||||
pnp_set_resources(dev);
|
pnp_set_resources(dev);
|
||||||
pnp_exit_ext_func_mode(dev);
|
pnp_exit_ext_func_mode(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void w83627ehg_pnp_enable_resources(device_t dev)
|
static void w83627ehg_pnp_enable_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_ext_func_mode(dev);
|
pnp_enter_ext_func_mode(dev);
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
|
@ -159,7 +159,7 @@ void w83627ehg_pnp_enable_resources(device_t dev)
|
||||||
pnp_exit_ext_func_mode(dev);
|
pnp_exit_ext_func_mode(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void w83627ehg_pnp_enable(device_t dev)
|
static void w83627ehg_pnp_enable(device_t dev)
|
||||||
{
|
{
|
||||||
if (!dev->enabled) {
|
if (!dev->enabled) {
|
||||||
pnp_enter_ext_func_mode(dev);
|
pnp_enter_ext_func_mode(dev);
|
||||||
|
|
|
@ -129,7 +129,7 @@ static void w83627hf_init(device_t dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void w83627hf_pnp_set_resources(device_t dev)
|
static void w83627hf_pnp_set_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_ext_func_mode(dev);
|
pnp_enter_ext_func_mode(dev);
|
||||||
pnp_set_resources(dev);
|
pnp_set_resources(dev);
|
||||||
|
@ -137,7 +137,7 @@ void w83627hf_pnp_set_resources(device_t dev)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void w83627hf_pnp_enable_resources(device_t dev)
|
static void w83627hf_pnp_enable_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pnp_enter_ext_func_mode(dev);
|
pnp_enter_ext_func_mode(dev);
|
||||||
pnp_enable_resources(dev);
|
pnp_enable_resources(dev);
|
||||||
|
@ -151,7 +151,7 @@ void w83627hf_pnp_enable_resources(device_t dev)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void w83627hf_pnp_enable(device_t dev)
|
static void w83627hf_pnp_enable(device_t dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dev->enabled) {
|
if (!dev->enabled) {
|
||||||
|
|
Loading…
Reference in New Issue