Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310669
b: refs/heads/master
c: d260987
h: refs/heads/master
i:
  310667: d06f395
v: v3
  • Loading branch information
Jerome Glisse authored and Dave Airlie committed Jun 10, 2012
1 parent f6832d3 commit 38fd70b
Show file tree
Hide file tree
Showing 18 changed files with 77 additions and 53 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 266ae4e6155419b3904f45b132db26d4b6fdceaf
refs/heads/master: d26098759cf6d32148649c165f87a7590bc25b89
2 changes: 1 addition & 1 deletion trunk/arch/m68k/include/asm/m528xsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
/*
* QSPI module.
*/
#define MCFQSPI_BASE (MCF_IPSBAR + 0x340)
#define MCFQSPI_IOBASE (MCF_IPSBAR + 0x340)
#define MCFQSPI_SIZE 0x40

#define MCFQSPI_CS0 147
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/m68k/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ asmlinkage void syscall_trace(void)
}
}

#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU)
#ifdef CONFIG_COLDFIRE
asmlinkage int syscall_trace_enter(void)
{
int ret = 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/m68k/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void __init time_init(void)
mach_sched_init(timer_interrupt);
}

#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
#ifdef CONFIG_M68KCLASSIC

u32 arch_gettimeoffset(void)
{
Expand All @@ -108,4 +108,4 @@ static int __init rtc_init(void)

module_init(rtc_init);

#endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */
#endif /* CONFIG_M68KCLASSIC */
6 changes: 2 additions & 4 deletions trunk/arch/m68k/platform/68328/timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#endif

static u32 m68328_tick_cnt;
static irq_handler_t timer_interrupt;

/***************************************************************************/

Expand All @@ -63,7 +62,7 @@ static irqreturn_t hw_tick(int irq, void *dummy)
TSTAT &= 0;

m68328_tick_cnt += TICKS_PER_JIFFY;
return timer_interrupt(irq, dummy);
return arch_timer_interrupt(irq, dummy);
}

/***************************************************************************/
Expand Down Expand Up @@ -100,7 +99,7 @@ static struct clocksource m68328_clk = {

/***************************************************************************/

void hw_timer_init(irq_handler_t handler)
void hw_timer_init(void)
{
/* disable timer 1 */
TCTL = 0;
Expand All @@ -116,7 +115,6 @@ void hw_timer_init(irq_handler_t handler)
/* Enable timer 1 */
TCTL |= TCTL_TEN;
clocksource_register_hz(&m68328_clk, TICKS_PER_JIFFY*HZ);
timer_interrupt = handler;
}

/***************************************************************************/
Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/m68k/platform/68360/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ extern void m360_cpm_reset(void);
#define OSCILLATOR (unsigned long int)33000000
#endif

static irq_handler_t timer_interrupt;
unsigned long int system_clock;

extern QUICC *pquicc;
Expand All @@ -53,7 +52,7 @@ static irqreturn_t hw_tick(int irq, void *dummy)

pquicc->timer_ter1 = 0x0002; /* clear timer event */

return timer_interrupt(irq, dummy);
return arch_timer_interrupt(irq, dummy);
}

static struct irqaction m68360_timer_irq = {
Expand All @@ -62,7 +61,7 @@ static struct irqaction m68360_timer_irq = {
.handler = hw_tick,
};

void hw_timer_init(irq_handler_t handler)
void hw_timer_init(void)
{
unsigned char prescaler;
unsigned short tgcr_save;
Expand Down Expand Up @@ -95,8 +94,6 @@ void hw_timer_init(irq_handler_t handler)

pquicc->timer_ter1 = 0x0003; /* clear timer events */

timer_interrupt = handler;

/* enable timer 1 interrupt in CIMR */
setup_irq(CPMVEC_TIMER1, &m68360_timer_irq);

Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/x86/crypto/aesni-intel_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -2460,12 +2460,10 @@ ENTRY(aesni_cbc_dec)
pxor IN3, STATE4
movaps IN4, IV
#else
pxor (INP), STATE2
pxor 0x10(INP), STATE3
pxor IN1, STATE4
movaps IN2, IV
movups (INP), IN1
pxor IN1, STATE2
movups 0x10(INP), IN2
pxor IN2, STATE3
#endif
movups STATE1, (OUTP)
movups STATE2, 0x10(OUTP)
Expand Down
10 changes: 4 additions & 6 deletions trunk/drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ struct regmap *regmap_init(struct device *dev,
map->lock = regmap_lock_mutex;
map->unlock = regmap_unlock_mutex;
}
map->format.buf_size = (config->reg_bits + config->val_bits) / 8;
map->format.reg_bytes = DIV_ROUND_UP(config->reg_bits, 8);
map->format.pad_bytes = config->pad_bits / 8;
map->format.val_bytes = DIV_ROUND_UP(config->val_bits, 8);
map->format.buf_size = DIV_ROUND_UP(config->reg_bits +
config->val_bits + config->pad_bits, 8);
map->format.buf_size += map->format.pad_bytes;
map->reg_shift = config->pad_bits % 8;
if (config->reg_stride)
map->reg_stride = config->reg_stride;
Expand Down Expand Up @@ -368,7 +368,7 @@ struct regmap *regmap_init(struct device *dev,

ret = regcache_init(map, config);
if (ret < 0)
goto err_debugfs;
goto err_free_workbuf;

/* Add a devres resource for dev_get_regmap() */
m = devres_alloc(dev_get_regmap_release, sizeof(*m), GFP_KERNEL);
Expand All @@ -383,8 +383,7 @@ struct regmap *regmap_init(struct device *dev,

err_cache:
regcache_exit(map);
err_debugfs:
regmap_debugfs_exit(map);
err_free_workbuf:
kfree(map->work_buf);
err_map:
kfree(map);
Expand Down Expand Up @@ -472,7 +471,6 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)

return ret;
}
EXPORT_SYMBOL_GPL(regmap_reinit_cache);

/**
* regmap_exit(): Free a previously allocated register map
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/char/hw_random/atmel-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
/* data ready? */
if (readl(trng->base + TRNG_ODATA) & 1) {
*data = readl(trng->base + TRNG_ODATA);
/*
ensure data ready is only set again AFTER the next data
word is ready in case it got set between checking ISR
and reading ODATA, so we don't risk re-reading the
same word
*/
readl(trng->base + TRNG_ISR);
return 4;
} else
return 0;
Expand Down
49 changes: 45 additions & 4 deletions trunk/drivers/gpu/drm/radeon/evergreen_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ struct evergreen_cs_track {
u32 cb_color_view[12];
u32 cb_color_pitch[12];
u32 cb_color_slice[12];
u32 cb_color_slice_idx[12];
u32 cb_color_attrib[12];
u32 cb_color_cmask_slice[8];/* unused */
u32 cb_color_fmask_slice[8];/* unused */
Expand Down Expand Up @@ -127,12 +128,14 @@ static void evergreen_cs_track_init(struct evergreen_cs_track *track)
track->cb_color_info[i] = 0;
track->cb_color_view[i] = 0xFFFFFFFF;
track->cb_color_pitch[i] = 0;
track->cb_color_slice[i] = 0;
track->cb_color_slice[i] = 0xfffffff;
track->cb_color_slice_idx[i] = 0;
}
track->cb_target_mask = 0xFFFFFFFF;
track->cb_shader_mask = 0xFFFFFFFF;
track->cb_dirty = true;

track->db_depth_slice = 0xffffffff;
track->db_depth_view = 0xFFFFC000;
track->db_depth_size = 0xFFFFFFFF;
track->db_depth_control = 0xFFFFFFFF;
Expand Down Expand Up @@ -250,10 +253,9 @@ static int evergreen_surface_check_2d(struct radeon_cs_parser *p,
{
struct evergreen_cs_track *track = p->track;
unsigned palign, halign, tileb, slice_pt;
unsigned mtile_pr, mtile_ps, mtileb;

tileb = 64 * surf->bpe * surf->nsamples;
palign = track->group_size / (8 * surf->bpe * surf->nsamples);
palign = MAX(8, palign);
slice_pt = 1;
if (tileb > surf->tsplit) {
slice_pt = tileb / surf->tsplit;
Expand All @@ -262,7 +264,10 @@ static int evergreen_surface_check_2d(struct radeon_cs_parser *p,
/* macro tile width & height */
palign = (8 * surf->bankw * track->npipes) * surf->mtilea;
halign = (8 * surf->bankh * surf->nbanks) / surf->mtilea;
surf->layer_size = surf->nbx * surf->nby * surf->bpe * slice_pt;
mtileb = (palign / 8) * (halign / 8) * tileb;;
mtile_pr = surf->nbx / palign;
mtile_ps = (mtile_pr * surf->nby) / halign;
surf->layer_size = mtile_ps * mtileb * slice_pt;
surf->base_align = (palign / 8) * (halign / 8) * tileb;
surf->palign = palign;
surf->halign = halign;
Expand Down Expand Up @@ -434,6 +439,39 @@ static int evergreen_cs_track_validate_cb(struct radeon_cs_parser *p, unsigned i

offset += surf.layer_size * mslice;
if (offset > radeon_bo_size(track->cb_color_bo[id])) {
/* old ddx are broken they allocate bo with w*h*bpp but
* program slice with ALIGN(h, 8), catch this and patch
* command stream.
*/
if (!surf.mode) {
volatile u32 *ib = p->ib.ptr;
unsigned long tmp, nby, bsize, size, min = 0;

/* find the height the ddx wants */
if (surf.nby > 8) {
min = surf.nby - 8;
}
bsize = radeon_bo_size(track->cb_color_bo[id]);
tmp = track->cb_color_bo_offset[id] << 8;
for (nby = surf.nby; nby > min; nby--) {
size = nby * surf.nbx * surf.bpe * surf.nsamples;
if ((tmp + size * mslice) <= bsize) {
break;
}
}
if (nby > min) {
surf.nby = nby;
slice = ((nby * surf.nbx) / 64) - 1;
if (!evergreen_surface_check(p, &surf, "cb")) {
/* check if this one works */
tmp += surf.layer_size * mslice;
if (tmp <= bsize) {
ib[track->cb_color_slice_idx[id]] = slice;
goto old_ddx_ok;
}
}
}
}
dev_warn(p->dev, "%s:%d cb[%d] bo too small (layer size %d, "
"offset %d, max layer %d, bo size %ld, slice %d)\n",
__func__, __LINE__, id, surf.layer_size,
Expand All @@ -446,6 +484,7 @@ static int evergreen_cs_track_validate_cb(struct radeon_cs_parser *p, unsigned i
surf.tsplit, surf.mtilea);
return -EINVAL;
}
old_ddx_ok:

return 0;
}
Expand Down Expand Up @@ -1532,6 +1571,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)
case CB_COLOR7_SLICE:
tmp = (reg - CB_COLOR0_SLICE) / 0x3c;
track->cb_color_slice[tmp] = radeon_get_ib_value(p, idx);
track->cb_color_slice_idx[tmp] = idx;
track->cb_dirty = true;
break;
case CB_COLOR8_SLICE:
Expand All @@ -1540,6 +1580,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)
case CB_COLOR11_SLICE:
tmp = ((reg - CB_COLOR8_SLICE) / 0x1c) + 8;
track->cb_color_slice[tmp] = radeon_get_ib_value(p, idx);
track->cb_color_slice_idx[tmp] = idx;
track->cb_dirty = true;
break;
case CB_COLOR0_ATTRIB:
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/gpu/drm/radeon/radeon_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@
* 2.13.0 - virtual memory support, streamout
* 2.14.0 - add evergreen tiling informations
* 2.15.0 - add max_pipes query
* 2.16.0 - fix evergreen 2D tiled surface calculation
*/
#define KMS_DRIVER_MAJOR 2
#define KMS_DRIVER_MINOR 15
#define KMS_DRIVER_MINOR 16
#define KMS_DRIVER_PATCHLEVEL 0
int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
int radeon_driver_unload_kms(struct drm_device *dev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/regulator/anatop-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static struct platform_driver anatop_regulator_driver = {
.of_match_table = of_anatop_regulator_match_tbl,
},
.probe = anatop_regulator_probe,
.remove = __devexit_p(anatop_regulator_remove),
.remove = anatop_regulator_remove,
};

static int __init anatop_regulator_init(void)
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2050,9 +2050,6 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev,
return -EINVAL;
}

if (min_uV < rdev->desc->min_uV)
min_uV = rdev->desc->min_uV;

ret = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step);
if (ret < 0)
return ret;
Expand Down
16 changes: 6 additions & 10 deletions trunk/drivers/regulator/gpio-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,16 @@ static int gpio_regulator_get_value(struct regulator_dev *dev)
}

static int gpio_regulator_set_value(struct regulator_dev *dev,
int min, int max, unsigned *selector)
int min, int max)
{
struct gpio_regulator_data *data = rdev_get_drvdata(dev);
int ptr, target = 0, state, best_val = INT_MAX;
int ptr, target, state, best_val = INT_MAX;

for (ptr = 0; ptr < data->nr_states; ptr++)
if (data->states[ptr].value < best_val &&
data->states[ptr].value >= min &&
data->states[ptr].value <= max) {
data->states[ptr].value <= max)
target = data->states[ptr].gpios;
best_val = data->states[ptr].value;
if (selector)
*selector = ptr;
}

if (best_val == INT_MAX)
return -EINVAL;
Expand All @@ -132,7 +128,7 @@ static int gpio_regulator_set_voltage(struct regulator_dev *dev,
int min_uV, int max_uV,
unsigned *selector)
{
return gpio_regulator_set_value(dev, min_uV, max_uV, selector);
return gpio_regulator_set_value(dev, min_uV, max_uV);
}

static int gpio_regulator_list_voltage(struct regulator_dev *dev,
Expand All @@ -149,7 +145,7 @@ static int gpio_regulator_list_voltage(struct regulator_dev *dev,
static int gpio_regulator_set_current_limit(struct regulator_dev *dev,
int min_uA, int max_uA)
{
return gpio_regulator_set_value(dev, min_uA, max_uA, NULL);
return gpio_regulator_set_value(dev, min_uA, max_uA);
}

static struct regulator_ops gpio_regulator_voltage_ops = {
Expand Down Expand Up @@ -290,7 +286,7 @@ static int __devinit gpio_regulator_probe(struct platform_device *pdev)

cfg.dev = &pdev->dev;
cfg.init_data = config->init_data;
cfg.driver_data = drvdata;
cfg.driver_data = &drvdata;

drvdata->dev = regulator_register(&drvdata->desc, &cfg);
if (IS_ERR(drvdata->dev)) {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/regulator/max8649.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
config.dev = &client->dev;
config.init_data = pdata->regulator;
config.driver_data = info;
config.regmap = info->regmap;

info->regulator = regulator_register(&dcdc_desc, &config);
if (IS_ERR(info->regulator)) {
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/regulator/palmas-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,9 @@ static __devinit int palmas_probe(struct platform_device *pdev)
err_unregister_regulator:
while (--id >= 0)
regulator_unregister(pmic->rdev[id]);
kfree(pmic->rdev);
kfree(pmic->desc);
kfree(pmic);
return ret;
}

Expand All @@ -785,6 +788,10 @@ static int __devexit palmas_remove(struct platform_device *pdev)

for (id = 0; id < PALMAS_NUM_REGS; id++)
regulator_unregister(pmic->rdev[id]);

kfree(pmic->rdev);
kfree(pmic->desc);
kfree(pmic);
return 0;
}

Expand Down
Loading

0 comments on commit 38fd70b

Please sign in to comment.