lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 16 May 2016 10:49:13 +0200 From: Neil Armstrong <narmstrong@...libre.com> To: Kevin Hilman <khilman@...libre.com> Cc: linux-kernel@...r.kernel.org, p.zabel@...gutronix.de, linux-arm-kernel@...ts.infradead.org, linux-amlogic@...ts.infradead.org Subject: Re: [RFC PATCH 1/3] reset: Add support for the Amlogic Meson GXBB Reset Controller On 05/14/2016 05:07 PM, Kevin Hilman wrote: > Neil Armstrong <narmstrong@...libre.com> writes: >> + writel(readl(reg_addr) | BIT(offset), reg_addr); > > The spec lists these registers as 16-bit registers, so probably readw/writew > are more appropriate here. Looking at the datasheet, the reset controller is an APB3 module, thus 32bit would be the only data width configured. Sure, it's strange to only have 16 used bits per registers... > >> + return 0; >> +} >> + >> +static int meson_gxbb_reset_deassert(struct reset_controller_dev *rcdev, >> + unsigned long id) >> +{ >> + struct meson_gxbb_reset *data = >> + container_of(rcdev, struct meson_gxbb_reset, rcdev); >> + unsigned int bank = id / BITS_PER_REG; >> + unsigned int offset = id % BITS_PER_REG; >> + void *reg_addr = data->reg_base + (bank << 2); >> + >> + if (bank >= REG_COUNT) >> + return -EINVAL; >> + >> + writel(readl(reg_addr) & ~BIT(offset), reg_addr); > > and here. > >> + return 0; >> +} > > Kevin > Neil
Powered by blists - more mailing lists