nyan: Use the board ID to decide how to initialize the PMIC.

Use the board ID to figure out how to initialize the PMIC instead of using a
config option.

BUG=None
TEST=Built and booted on both types of nyan.
BRANCH=None

Change-Id: I26f735f3c7ba910fd237a1d00d616d3d89b9fbd9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/177489
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
Gabe Black 2013-11-21 00:49:33 -08:00 committed by chrome-internal-fetch
commit 677bdb9df5

View file

@ -23,6 +23,7 @@
#include <stdint.h>
#include <stdlib.h>
#include "boardid.h"
#include "pmic.h"
enum {
@ -44,7 +45,7 @@ void pmic_init(unsigned bus)
*/
/* First set VDD_CPU to 1.2V, then enable the VDD_CPU regulator. */
if (CONFIG_NYAN_IN_A_PIXEL)
if (board_id() == 0)
pmic_write_reg(bus, 0x00, 0x3c);
else
pmic_write_reg(bus, 0x00, 0x50);