mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
- use devm_clk_get_enabled() helper
- prototype fixes - cleanup unused stuff -----BEGIN PGP SIGNATURE----- iQJOBAABCAA4FiEEbt46xwy6kEcDOXoUeZbBVTGwZHAFAmbiudYaHHRzYm9nZW5k QGFscGhhLmZyYW5rZW4uZGUACgkQeZbBVTGwZHBAMA//caBmJHQQqkHGb7lNFGi4 5O13MQINwsMQYY+tVUyG+ZMWYukMdWZtXBam5eZCp1mCVyPEFDPLJlRqGk9D3T5h pExHdfC6lD+vYHSJcMOKx0BWpNSPmOYlKntKWCeazLnGZjDXVdIRj1HEv4nExF9x E7wnGGsTNhJf50Lt3ZSSBF6wgX0fZOl66YcyOVAe6pHQhZxrumDZoPLCqVoHcxln aoBacFSe6YbpXZs0IlNWDBhQLiEhzcbXyqXDsnZRFwTvwFxYldjId4CKqWG5TjxU zFJhkC/nMejB3U/MuoDajLD3u3tp471hRNHGFzovn694cJblMZ495sea8ZH1xfhG dAuqmaV43lEluGAzAnXKeCBJLjzC9ZranjFqQgI3L+MsyNh9yXpEq8nXFyXJXlnG lg8vO69KvSIrc95GHFlBonbEs0XyvCsP7G+lfQHTcjC6hC87fM2IsegFkFV/IiXf jYZyYlTrhLC2RA0trDBhS3DIlEQlP9nivW6Wq+7T04Au6OAN1xz+BpGY3ilLf2/J VvdEvWQ1oonFbQXp9a7DAkHD3N4iJ/Htcc1ptb+iD46o1M6S462m7DOB3Gi5ts9k VQWpsGA97JRWd/bmXwF15Jc3PeBSgwkvlzXsOYYUFSNFSl3FHPKR126EfFMGb6jE T4fmOVRKKSwCBi1U16nmYm0= =vPgt -----END PGP SIGNATURE----- Merge tag 'mips_6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - use devm_clk_get_enabled() helper - prototype fixes - cleanup unused stuff * tag 'mips_6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: mips: Remove posix_types.h include from sigcontext.h bus: bt1-apb: change to use devm_clk_get_enabled() helper bus: bt1-axi: change to use devm_clk_get_enabled() helper MIPS: dec: prom: Remove unused unregister_prom_console() declaration MIPS: Remove unused mips_display/_scroll_message() declarations MIPS: Remove unused declarations in asm/cmp.h MIPS: MT: Remove unused function mips_mt_regdump() mips/jazz: remove unused jazz_handle_int() declaration MIPS: Remove unused function dump_au1000_dma_channel() in dma.c MIPS: ralink: Fix missing `get_c0_perfcount_int` prototype MIPS: ralink: Fix missing `plat_time_init` prototype
This commit is contained in:
commit
8617d7d629
@ -131,29 +131,6 @@ static const struct dma_dev dma_dev_table_bank2[DMA_NUM_DEV_BANK2] = {
|
||||
{ AU1100_SD1_PHYS_ADDR + 0x04, DMA_DS | DMA_DW8 | DMA_DR } /* coherent */
|
||||
};
|
||||
|
||||
void dump_au1000_dma_channel(unsigned int dmanr)
|
||||
{
|
||||
struct dma_chan *chan;
|
||||
|
||||
if (dmanr >= NUM_AU1000_DMA_CHANNELS)
|
||||
return;
|
||||
chan = &au1000_dma_table[dmanr];
|
||||
|
||||
printk(KERN_INFO "Au1000 DMA%d Register Dump:\n", dmanr);
|
||||
printk(KERN_INFO " mode = 0x%08x\n",
|
||||
__raw_readl(chan->io + DMA_MODE_SET));
|
||||
printk(KERN_INFO " addr = 0x%08x\n",
|
||||
__raw_readl(chan->io + DMA_PERIPHERAL_ADDR));
|
||||
printk(KERN_INFO " start0 = 0x%08x\n",
|
||||
__raw_readl(chan->io + DMA_BUFFER0_START));
|
||||
printk(KERN_INFO " start1 = 0x%08x\n",
|
||||
__raw_readl(chan->io + DMA_BUFFER1_START));
|
||||
printk(KERN_INFO " count0 = 0x%08x\n",
|
||||
__raw_readl(chan->io + DMA_BUFFER0_COUNT));
|
||||
printk(KERN_INFO " count1 = 0x%08x\n",
|
||||
__raw_readl(chan->io + DMA_BUFFER1_COUNT));
|
||||
}
|
||||
|
||||
/*
|
||||
* Finds a free channel, and binds the requested device to it.
|
||||
* Returns the allocated channel number, or negative on error.
|
||||
|
@ -7,12 +7,4 @@
|
||||
*/
|
||||
struct task_struct;
|
||||
|
||||
extern void cmp_smp_setup(void);
|
||||
extern void cmp_smp_finish(void);
|
||||
extern void cmp_boot_secondary(int cpu, struct task_struct *t);
|
||||
extern void cmp_init_secondary(void);
|
||||
extern void cmp_prepare_cpus(unsigned int max_cpus);
|
||||
|
||||
/* This is platform specific */
|
||||
extern void cmp_send_ipi(int cpu, unsigned int action);
|
||||
#endif /* _ASM_CMP_H */
|
||||
|
@ -160,6 +160,5 @@ extern void prom_identify_arch(u32);
|
||||
extern void prom_init_cmdline(s32, s32 *, u32);
|
||||
|
||||
extern void register_prom_console(void);
|
||||
extern void unregister_prom_console(void);
|
||||
|
||||
#endif /* _ASM_DEC_PROM_H */
|
||||
|
@ -124,7 +124,6 @@ extern int request_au1000_dma(int dev_id,
|
||||
extern void free_au1000_dma(unsigned int dmanr);
|
||||
extern int au1000_dma_read_proc(char *buf, char **start, off_t fpos,
|
||||
int length, int *eof, void *data);
|
||||
extern void dump_au1000_dma_channel(unsigned int dmanr);
|
||||
extern spinlock_t au1000_dma_spin_lock;
|
||||
|
||||
static inline struct dma_chan *get_dma_chan(unsigned int dmanr)
|
||||
|
@ -73,7 +73,4 @@ extern void mips_pcibios_init(void);
|
||||
#define mips_pcibios_init() do { } while (0)
|
||||
#endif
|
||||
|
||||
extern void mips_scroll_message(void);
|
||||
extern void mips_display_message(const char *str);
|
||||
|
||||
#endif /* __ASM_MIPS_BOARDS_GENERIC_H */
|
||||
|
@ -17,8 +17,6 @@ extern int vpelimit;
|
||||
extern cpumask_t mt_fpu_cpumask;
|
||||
extern unsigned long mt_fpemul_threshold;
|
||||
|
||||
extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value);
|
||||
|
||||
#ifdef CONFIG_MIPS_MT
|
||||
extern void mips_mt_set_cpuoptions(void);
|
||||
#else
|
||||
|
@ -56,7 +56,6 @@ struct sigcontext {
|
||||
|
||||
#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
|
||||
|
||||
#include <linux/posix_types.h>
|
||||
/*
|
||||
* Keep this struct definition in sync with the sigcontext fragment
|
||||
* in arch/mips/kernel/asm-offsets.c
|
||||
|
@ -23,8 +23,6 @@
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/tlbmisc.h>
|
||||
|
||||
extern asmlinkage void jazz_handle_int(void);
|
||||
|
||||
extern void jazz_machine_restart(char *command);
|
||||
|
||||
static struct resource jazz_io_resources[] = {
|
||||
|
@ -43,83 +43,6 @@ static int __init maxtcs(char *str)
|
||||
|
||||
__setup("maxtcs=", maxtcs);
|
||||
|
||||
/*
|
||||
* Dump new MIPS MT state for the core. Does not leave TCs halted.
|
||||
* Takes an argument which taken to be a pre-call MVPControl value.
|
||||
*/
|
||||
|
||||
void mips_mt_regdump(unsigned long mvpctl)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long vpflags;
|
||||
unsigned long mvpconf0;
|
||||
int nvpe;
|
||||
int ntc;
|
||||
int i;
|
||||
int tc;
|
||||
unsigned long haltval;
|
||||
unsigned long tcstatval;
|
||||
|
||||
local_irq_save(flags);
|
||||
vpflags = dvpe();
|
||||
printk("=== MIPS MT State Dump ===\n");
|
||||
printk("-- Global State --\n");
|
||||
printk(" MVPControl Passed: %08lx\n", mvpctl);
|
||||
printk(" MVPControl Read: %08lx\n", vpflags);
|
||||
printk(" MVPConf0 : %08lx\n", (mvpconf0 = read_c0_mvpconf0()));
|
||||
nvpe = ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1;
|
||||
ntc = ((mvpconf0 & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1;
|
||||
printk("-- per-VPE State --\n");
|
||||
for (i = 0; i < nvpe; i++) {
|
||||
for (tc = 0; tc < ntc; tc++) {
|
||||
settc(tc);
|
||||
if ((read_tc_c0_tcbind() & TCBIND_CURVPE) == i) {
|
||||
printk(" VPE %d\n", i);
|
||||
printk(" VPEControl : %08lx\n",
|
||||
read_vpe_c0_vpecontrol());
|
||||
printk(" VPEConf0 : %08lx\n",
|
||||
read_vpe_c0_vpeconf0());
|
||||
printk(" VPE%d.Status : %08lx\n",
|
||||
i, read_vpe_c0_status());
|
||||
printk(" VPE%d.EPC : %08lx %pS\n",
|
||||
i, read_vpe_c0_epc(),
|
||||
(void *) read_vpe_c0_epc());
|
||||
printk(" VPE%d.Cause : %08lx\n",
|
||||
i, read_vpe_c0_cause());
|
||||
printk(" VPE%d.Config7 : %08lx\n",
|
||||
i, read_vpe_c0_config7());
|
||||
break; /* Next VPE */
|
||||
}
|
||||
}
|
||||
}
|
||||
printk("-- per-TC State --\n");
|
||||
for (tc = 0; tc < ntc; tc++) {
|
||||
settc(tc);
|
||||
if (read_tc_c0_tcbind() == read_c0_tcbind()) {
|
||||
/* Are we dumping ourself? */
|
||||
haltval = 0; /* Then we're not halted, and mustn't be */
|
||||
tcstatval = flags; /* And pre-dump TCStatus is flags */
|
||||
printk(" TC %d (current TC with VPE EPC above)\n", tc);
|
||||
} else {
|
||||
haltval = read_tc_c0_tchalt();
|
||||
write_tc_c0_tchalt(1);
|
||||
tcstatval = read_tc_c0_tcstatus();
|
||||
printk(" TC %d\n", tc);
|
||||
}
|
||||
printk(" TCStatus : %08lx\n", tcstatval);
|
||||
printk(" TCBind : %08lx\n", read_tc_c0_tcbind());
|
||||
printk(" TCRestart : %08lx %pS\n",
|
||||
read_tc_c0_tcrestart(), (void *) read_tc_c0_tcrestart());
|
||||
printk(" TCHalt : %08lx\n", haltval);
|
||||
printk(" TCContext : %08lx\n", read_tc_c0_tccontext());
|
||||
if (!haltval)
|
||||
write_tc_c0_tchalt(0);
|
||||
}
|
||||
printk("===========================\n");
|
||||
evpe(vpflags);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static int mt_opt_rpsctl = -1;
|
||||
static int mt_opt_nblsu = -1;
|
||||
static int mt_opt_forceconfig7;
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <asm/mips-cps.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
int get_c0_perfcount_int(void)
|
||||
{
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include <linux/of_clk.h>
|
||||
#include <linux/clocksource.h>
|
||||
|
||||
#include <asm/time.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
void __init plat_time_init(void)
|
||||
|
@ -185,34 +185,13 @@ static int bt1_apb_request_rst(struct bt1_apb *apb)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void bt1_apb_disable_clk(void *data)
|
||||
{
|
||||
struct bt1_apb *apb = data;
|
||||
|
||||
clk_disable_unprepare(apb->pclk);
|
||||
}
|
||||
|
||||
static int bt1_apb_request_clk(struct bt1_apb *apb)
|
||||
{
|
||||
int ret;
|
||||
|
||||
apb->pclk = devm_clk_get(apb->dev, "pclk");
|
||||
apb->pclk = devm_clk_get_enabled(apb->dev, "pclk");
|
||||
if (IS_ERR(apb->pclk))
|
||||
return dev_err_probe(apb->dev, PTR_ERR(apb->pclk),
|
||||
"Couldn't get APB clock descriptor\n");
|
||||
|
||||
ret = clk_prepare_enable(apb->pclk);
|
||||
if (ret) {
|
||||
dev_err(apb->dev, "Couldn't enable the APB clock\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = devm_add_action_or_reset(apb->dev, bt1_apb_disable_clk, apb);
|
||||
if (ret) {
|
||||
dev_err(apb->dev, "Can't add APB EHB clocks disable action\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
apb->rate = clk_get_rate(apb->pclk);
|
||||
if (!apb->rate) {
|
||||
dev_err(apb->dev, "Invalid clock rate\n");
|
||||
|
@ -146,33 +146,14 @@ static int bt1_axi_request_rst(struct bt1_axi *axi)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void bt1_axi_disable_clk(void *data)
|
||||
{
|
||||
struct bt1_axi *axi = data;
|
||||
|
||||
clk_disable_unprepare(axi->aclk);
|
||||
}
|
||||
|
||||
static int bt1_axi_request_clk(struct bt1_axi *axi)
|
||||
{
|
||||
int ret;
|
||||
|
||||
axi->aclk = devm_clk_get(axi->dev, "aclk");
|
||||
axi->aclk = devm_clk_get_enabled(axi->dev, "aclk");
|
||||
if (IS_ERR(axi->aclk))
|
||||
return dev_err_probe(axi->dev, PTR_ERR(axi->aclk),
|
||||
"Couldn't get AXI Interconnect clock\n");
|
||||
|
||||
ret = clk_prepare_enable(axi->aclk);
|
||||
if (ret) {
|
||||
dev_err(axi->dev, "Couldn't enable the AXI clock\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = devm_add_action_or_reset(axi->dev, bt1_axi_disable_clk, axi);
|
||||
if (ret)
|
||||
dev_err(axi->dev, "Can't add AXI clock disable action\n");
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bt1_axi_request_irq(struct bt1_axi *axi)
|
||||
|
Loading…
Reference in New Issue
Block a user